Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support reading config vars from ENV #2090
In addition to
Is this a worthy enhancement?
Command line arguments appear to be set in
An alternative would be to use environment variables, but I don't think Hugo uses them at all.
Note: In Jekyll, I currently do this by abusing
I'm pretty sure you can set config vars from environment vars. See https://github.com/spf13/viper ... if it doesn't work, Viper is the correct repo to report issues about it.
We will not create flags for all the config.
I don't think environment variables are currently set up in hugo. Testing
Adding a quick hack of
Allows me to run
HUGO_TITLE='Example Title' HUGO_BASEURL='http://example.com' /Users/nic/Go/src/github.com/spf13/hugo/hugo