Redundant {% include JB/setup %} in sample post?
mchelen opened this issue · 3 comments
The sample post has {% include JB/setup %}
after the YAML.
Isn't {% include JB/setup %}
already being run in the post layout?
It seems like the sample post should not need to include JB/setup as well.
I know this is an old issue, but ...
You're absolutely correct. I stripped the extraneous includes from my posts. As you said, it's not needed, and it's extra baggage if you make the move to another JB-like helper.
Assigning this to me. Low-hanging fruit.
Strip {% include JB/setup %}
from:
jekyll-bootstrap/_posts/core-samples/2011-12-29-jekyll-introduction.md
After researching issue #113, it looks like this needs to stay as is. While it seems redundant, it's not.
Liquid variables are scoped to the page, so the page / post / default template includes the JB/setup
snippet, but as soon as you hit an actual page / post / draft, the `page.whatever' variables are cleared and populated by the yaml header. So ...
The {% include JB/setup %}
needs to stay in place so that BASE_PATH
and HOME_PATH
are properly set. See my notes in issue #113 on how the ASSET_PATH
is unreliable at the page / post / draft level.