Skip to content

Use hugo.Environment instead of getenv#29240

Merged
XhmikosR merged 2 commits intomasterfrom
master-xmr-hugo-env
Feb 22, 2020
Merged

Use hugo.Environment instead of getenv#29240
XhmikosR merged 2 commits intomasterfrom
master-xmr-hugo-env

Conversation

@XhmikosR
Copy link
Member

@XhmikosR XhmikosR commented Aug 10, 2019

This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.

WIP because I like the flexibility. I might change the patch to set the environment with Hugo's --environment CLI flag instead.

This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.
Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested this locally, but diff looks right to me!

@XhmikosR XhmikosR merged commit b8ffcdf into master Feb 22, 2020
@XhmikosR XhmikosR deleted the master-xmr-hugo-env branch February 22, 2020 06:54
olsza pushed a commit to olsza/bootstrap that referenced this pull request Oct 3, 2020
This is set automatically to "development" when the local server is running, and to "production" when Hugo builds the site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants