I’m starting this thread so people can share their questions regarding the soon to be documented Hugo .53 feature for managing configuration through a set of config dir and files (see GitHub Issue)
I’ll start with mine:
Is there a way to retrieve the environment key or the value of the --environment
tag?
Current workaround is to add a env
as config parameter, but as we have default env keys (development for hugo serve
, production for hugo
), I guess we should be able to get those out of the box.
Maybe getenv
could accept 0 parameter and return the environment key in such case?