3 ms·
Unless I'm mistaken, it seems the author missed this short paragraph in the docs: With a clear understanding of the theme’s files, you can now override any the
by chrsstrm 9y ago
Unless I'm mistaken, it seems the author missed this short paragraph in the docs:
With a clear understanding of the theme’s files, you can now override any theme file by creating a similarly named file in your Jekyll site directory.
So the gem is the base theme and you overwrite any of those theme files by inserting a same-named file in the same dir structure in your project root. I've haven't jumped to Jekyll 3 yet but if I'm reading this correctly, this doesn't seem like that big of a deal.
- pulkitsh1234 9y agoYes I'm aware of that :-) It's mentioned here too : https://jekyllrb.com/docs/themes/#converting-gem-based-themes-to-regular-themes https://jekyllrb.com/docs/themes/#converting-gem-based-theme... In fact, I have added that as an update on the post too. I can't see why someone should use gem-based themes, when eventually they'll need to dump the entire code into the Jekyll project.
- chrsstrm 9y agoExcept you don't drop the entire theme code into your project, just the pieces you want to overwrite. I have to believe here that the idea was to make themes extendable, not customizable (in the way previous Jekyll themes operated). This feels very similar to the concept of a child theme in WordPress, which simply extends the parent theme. Since we're just extending the parent theme and not editing those files, sure, put them in a gem and let me leave them out of my repository. Now you're only tracking the delta of your changes, not the whole theme. When done correctly, this should also let you more easily swap out the parent theme to something different while maintaining your changes with minimal effort. Again, I haven't played with this yet, but the more I think about it the more it makes sense and I'm kind of looking forward to porting a few of the sites I manage.