-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support for .Hugo.Environment variable #453
Comments
Had an idea for how to approach this. Sending a new PR. |
tlindsay42
added a commit
to tlindsay42/gohugo-theme-ananke
that referenced
this issue
Jan 3, 2022
* Adds GetEnvironmentName and IsProduction partial functions, which improve DRY * Add prioritization for determining environment name, which favors the existing methods: the `HUGO_ENV` environment variable and site config `env` theme parameter * Adds `useHugoEnv` theme parameter to use the value of `.Hugo.Environment` for the build environment name
tlindsay42
added a commit
to tlindsay42/gohugo-theme-ananke
that referenced
this issue
Jan 3, 2022
tlindsay42
added a commit
to tlindsay42/gohugo-theme-ananke
that referenced
this issue
Jan 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just discovered that the .Hugo.Environment variable is not evaluated as an alternative to HUGO_ENV environment variable and .Site.Params.env theme parameter. Testing for this condition would be an improvement.
Example
https://github.com/theNewDynamic/gohugo-theme-ananke/blob/v2.8.0/layouts/_default/baseof.html#L12
The text was updated successfully, but these errors were encountered: