Override includes in nested folders?


#1

I’m attempting to override an include in a gem-based theme, in which the .html file is nested 2 folders deep inside the gem’s _includes folder.

The structure is:

[gem_home]/_includes/[folder_1]/[folder_2]/file.html

I’ve created the following in my project directory:

[project_home]/_includes/[folder_1]/[folder_2]/file.html

But it’s not being picked up. Is this a limitation of jekyll?


#2

You have a link to a repo where you’re trying to do this? Maybe something else is at play.
I just did a test with one of my gem-based themes and was able to override an include that was several folders deep.

As far as I can tell there isn’t any sort of limitation with Jekyll to do this.


#3

Thanks, Michael. It’s a paid theme, so I’m not able to share, but I appreciate you confirming that this should work.