Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote theme doesn’t work due to submodule #13

Closed
mrmanc opened this issue Aug 31, 2018 · 3 comments
Closed

Remote theme doesn’t work due to submodule #13

mrmanc opened this issue Aug 31, 2018 · 3 comments

Comments

@mrmanc
Copy link
Collaborator

mrmanc commented Aug 31, 2018

The use of a submodule for the reveal.js source means that you can’t use jekyll-remote-theme with this repository, because the submodule doesn’t get included in the zip that the jekyll-remote-theme plugin downloads from GitHub. This is a known issue with GitHub repo zips and submodules. This has been an issue for a while despite people asking GitHub to fix/change it so I see no reason to think it will change.

I did a bit of looking around and it seems that git subtree is an alternative approach that works. The difference as I understand it is that the remote code actually lives in your repo too, rather than it being a pointer to a remote location. I’ve tried this in a fork, and am able to successfully use that fork as a remote theme. There might be a better way to do this with some dependency management but this seemed the easiest solution to me.

Would you be open to a pull request to change the mechanism for including reveal.js? I believe this is safe with reveal.js being under MIT licence.

@dploeger
Copy link
Owner

dploeger commented Sep 3, 2018

Um... I never thought of this as a jekyll-theme. Mostly, because I only knew little about jekyll when I started this repo.

But I can see your point, that this really is just a theme. But doesn't that mean more modifications to the code to make it Jekyll-theme-compatible?

About subtree, I'm not so sure. There's one major drawback to git subtrees and that's that there is no clear line between original code and subtree code and that's what I like about git submodules. Every submodule has its own management.

But I'd be happy to support jekyll-remote-theme if there'd be another way. I could, for example, provide zips including the submodule as binary attachments to releases.

@mrmanc
Copy link
Collaborator Author

mrmanc commented Sep 3, 2018

Um... I never thought of this as a jekyll-theme. Mostly, because I only knew little about jekyll when I started this repo.

Yeah, I’ve only started looking at themes recently after getting frustrated with managing changes across multiple pages sites. I loved using this project as a way of including a presentation in the same repo as a set of practical exercises that accompany it though. I can see me using it a fair bit over the next year.

But I can see your point, that this really is just a theme. But doesn't that mean more modifications to the code to make it Jekyll-theme-compatible?

Not really. You get the layout by including it as a theme, and the repo that uses it as a theme can be as slim as a _posts directory, an index.html file and a _config.yml file. I probably would suggest moving the contents of index.html into the layout so that it wasn’t duplicated in the pages repo. And if you renamed the layout to default.html then I don’t think index.html would even need anything in the frontmatter.

About subtree, I'm not so sure. There's one major drawback to git subtrees and that's that there is no clear line between original code and subtree code and that's what I like about git submodules. Every submodule has its own management.

Fair enough… I can see that concern. I knew nothing about subtree until I started looking for alternatives and I can see that it’s not the nicest option. What you have already allows the user to specify the location of the reveal.js code, so they can always set up the submodule themselves if they wish—I was just trying to avoid having this dependency declared in every repository that uses this theme.

But I'd be happy to support jekyll-remote-theme if there'd be another way. I could, for example, provide zips including the submodule as binary attachments to releases.

I’ll let you know if I think of anything else that doesn’t involve adding reveal.js to each pages repo. I don’t think binary release attachments are better—I’d rather follow the instructions to add the submodule myself than unpacking code into the repo and having to upgrade it from time to time. Ultimately it feels like this is an issue with how the GitHub zip packaging works—it seems to me that it should include submodules.

@dploeger
Copy link
Owner

dploeger commented Sep 3, 2018

Great. Thanks for caring. I'll go ahead and close this in the meantime. Just reopen it once you found a better solution.

@dploeger dploeger closed this as completed Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants