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

Add 'env' as a default variable available via {{ site.env }} in Twig templates #196

Merged
merged 3 commits into from Jan 29, 2015

Conversation

Stubbs
Copy link
Contributor

@Stubbs Stubbs commented Jan 27, 2015

The environment is available while pulling in config files so this change
adds the environment to the 'site' variable.

I've tried to avoid code duplication by adding the getConfigFile() method,
but I'm not totally happy with the if .. elseif .. else block.

…templates.

The environment is available while pulling in config files so this change
adds the environment to the 'site' variable.

I've tried to avoid code duplication by adding the getConfigFile() method,
but I'm not totally happy with the if .. elseif .. else block.
@simensen
Copy link
Member

@Stubbs Thanks! I'd like to get another set of eyes on this before we merge it. This exposes it by way of site.env, correct?

@Stubbs
Copy link
Contributor Author

Stubbs commented Jan 27, 2015

Correct.

@Stubbs
Copy link
Contributor Author

Stubbs commented Jan 27, 2015

Not sure why the coverage is so low for 5.3.3? That's what's caused the failure above.

@simensen
Copy link
Member

@Stubbs I'm not worried about that right now. Code coverage for Sculpin is slow anyway and we'll fix that at another time. But thanks for looking into the Travis CI failure. I appreciate it!

@davedevelopment
Copy link
Contributor

Agree that structure is a bit messy, but not worth sweating over 👍

@WyriHaximus
Copy link
Member

Made a small PR on your PR regarding the structure: Stubbs#1

👍 on exposing the environment through {{ site.env }}.

Changed the way a configuration file is detected.
@Stubbs
Copy link
Contributor Author

Stubbs commented Jan 28, 2015

👍 @WyriHaximus I like that, I've merged it in to my pull request.

@davedevelopment
Copy link
Contributor

👍 👍

simensen added a commit that referenced this pull request Jan 29, 2015
Add 'env' as a default variable available via {{ site.env }} in Twig templates
@simensen simensen merged commit 56893a9 into sculpin:master Jan 29, 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

Successfully merging this pull request may close these issues.

None yet

4 participants