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
Hugo 'new' command ignores --config flag #5177
I'm using Hugo in a project that requires different configurations based on the environment. I have a
FWIW, it seems like I'm not the only one who's come across this: https://discourse.gohugo.io/t/how-to-use-a-custom-config-file-with-huge-new-command/13089/5
Placing an empty config.toml in the project's root directory will not work, and is not an acceptable workaround because you would want the project to be built with the proper configuration params. A workaround that I created is a Makefile that looks like:
Here I'm copying the config file and placing it in the root directory and then removing it after running the command. This works, but it's not a great workaround.