Is it possible to transfer the following hugo CMD arguments into the config.toml
file (of various scope as in _default
, development
, and production
) so that the end user can just safely use hugo server
and hugo
without needing to supply additional arguments for respective rendering and building their site?
# BASH
hugo server --noBuildLock \
--disableFastRender \
--port 8080 \
--gc
# BAT
hugo server --noBuildLock ^
--disableFastRender ^
--port 8080 ^
--gc
Context:
- I’m currently maintaining a BASH+BAT script to wrap the hugo command lines and their arguments. I do not intend to further maintaining this hybridized script and wish to instruct user to just use
hugo server
andhugo
without compromising the theme module user experience. - I’ve been digging through the source codes but I’m not sure what config can be sourced from the config file. (Ref: hugo/config.go at f1062519ae7d5dd41b681e43e992dbc66fcd0855 · gohugoio/hugo · GitHub)
Reference:
- Current latest config setup: Hestia/hestiaHUGO/config at experimental · ZORALab/Hestia · GitHub
- Current hybridized server initialisation script (link can break if the script is successfully replaced): Hestia/server.cmd at experimental · ZORALab/Hestia · GitHub