0
votes

I'm trying to add folders inside the "_includes" directory on Jekyll. It doesn't work. I've tried adding an underscore to the folder but it doesn't work either. What am I doing wrong? I'm using Jekyll 3.7.0

The most useful link I found about it was this one

Here are some screenshots:

enter image description here enter image description here

And the stacktrace is:

 Incremental build: disabled. Enable with --incremental
  Generating...
    Pagination: Pagination is enabled, but I couldn't find an index.html page to use as the pagination template. Skipping pagination.

Liquid Exception: Could not locate the included file 'sidebar.html' in any of [".../_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source. in /_layouts/page.html
jekyll 3.7.0 | Error:  Could not locate the included file 'sidebar.html' in any of [".../_includes"]. Ensure it exists in one of those directories and, if it is a symlink, does not point outside your site source.

I think I'm supposed to be able to use sub-directories. What am I doing wrong? Thank you in advance!

1

1 Answers

0
votes

Apparently, I found the problem. I don't know why but Jekyll is somehow able to parse comments. It detected I had commented a piece of code referencing the old sidebar.html.

As @DavidJaquel mentions in a comment below, HTML comments <!-- --> are not stopping Liquid to parse our page content, so we should be using Liquid syntax:

{% comment %}
   ...
{% endcomment %}

enter image description here