0

(Disclaimer: Jekyll noob here - using version 3.5.2)

I am trying to customize a Jekyll gem-based theme. I am aware that in order to do this I have to locate the files I want to overwrite (bundle show theme-name), copy them locally and then edit them. Now, whenever this file is requested, Jekyll will look first locally and then on the gem files. My problem is that Jekyll doesn't seem to do it for the files that are included in the frontmatter of other files.

To explain here is my non-working structure:

gem theme/ 
|- _layouts/
   |- blog.html (has all the .css)
   |- page.html (has "layout: blog" in the frontmatter) 
   |- post.html (has "layout: blog") <- THIS is what I want to edit
   |- etc...

local jekyll_app/
|- index.html (has "layout: page")
|- _layouts/
   |- post.html (overwritten with my changes - works)

When I serve this: first I get a build warning about missing layout 'page'. Why doesn't Jekyll search in the gem folder? After adding only page.html locally, no build warning but nothing from blog.html is inserted in _site/index.html (eg. no CSS is requested at all).

Researching I found this which has to do with metadata only. What am I missing? Thanks!

spygi
  • 412
  • 3
  • 10
  • Impossible to reproduce this behavior. Did you have a repository url for this non working code ? – David Jacquel Mar 16 '18 at 21:52
  • Thanks for looking into this @DavidJacquel, yes try to build this commit: https://github.com/spygi/tech-blog/commit/5dea60118d07330ef48267c5546ae07f8b5bdedf I added some more explanations in the question. – spygi Mar 17 '18 at 15:01
  • Sorry cannot reproduce your problem. `_layouts/blog.html` loads perfectly from the gem and css is loading. – David Jacquel Mar 17 '18 at 23:28

0 Answers0