Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant {% include JB/setup %} in sample post? #227

Closed
mchelen opened this issue Aug 28, 2014 · 3 comments
Closed

Redundant {% include JB/setup %} in sample post? #227

mchelen opened this issue Aug 28, 2014 · 3 comments
Assignees
Milestone

Comments

@mchelen
Copy link
Contributor

mchelen commented Aug 28, 2014

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.

@groundh0g
Copy link
Collaborator

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.

@groundh0g groundh0g self-assigned this Feb 27, 2015
@groundh0g groundh0g added the bug label Feb 28, 2015
@groundh0g
Copy link
Collaborator

Assigning this to me. Low-hanging fruit.

Strip {% include JB/setup %} from:

jekyll-bootstrap/_posts/core-samples/2011-12-29-jekyll-introduction.md

@groundh0g
Copy link
Collaborator

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.

@groundh0g groundh0g added this to the v 0.4.0 milestone Mar 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants