I attempt to modify my actual Hugo site for huc.fr.eu.org to manage outputs for gemini files.
For this I created a specific config files: cfg.gmi.yaml (only to use with hugo command)
Egual, I made new directories, just to use with this:
layoutsDir: gemini-layouts/; with index.gmi and two files (for list and single) on _default dir.
publishDir: gemini/
staticDir: gemini-static/ (just empty) (both directories are not commit on the repository)
When I try: hugo --config cfg.gmi.yaml, the result is that it doesn’t generate any files on gemini publishDir.
Somebody can help me to understand the reason, please.
Actual git: SH-Web / Hugo / huc.fr.eu.org · GitLab
Hugo version: hugo v0.159.1+extended linux/amd64 BuildDate=2026-03-30T08:11:37Z VendorInfo=debian:0.159.1-1
I got 8 pages created for each language, after touching the following points:
correct the type in cfg.gmi.yaml
changed ouputFormats: to outputFormats: (add the t)
addresses config overwrites
the config folder is read, too – even if a config file is used. Guess duplicate definitions in both files will produce some conflicts so I renamed:
mediatypes.yaml → mediatypes.yaml1
outputformats.yaml → outputformats.yaml1
outputs.yaml → outputs.yaml1
removed the usage of layouts-gemini/_defaults
guess that has to do with the new lookup order
moved all files from layouts-gemini/_defaults → ‘layouts-gemini/’ directly
general hints:
use --logLevel debug to see something more when building
address the deprecations (languageCode) you are on 0159.1
By default, this Hugo site allows me to generate HTML files for publication on my website.
Just about config; it seems not possible to change this behaviour.
This means I have to write a script to rename the directory before generating the gemini files; (because I’m not going to bother editing the YAML files in question), and not forget to rename it correctly after generation.
Or… create another hugo site, just configure with cfg.gmi.yaml and rsync before all are into this hugo site content, before generate into this new hugo site.
I’m sceptical.
PS: With your instructions, I can too generate files; I’m going to modify and rectify all that needs. Thanks
use multiple config files
specify commons in the /config/ and specials in one or two config files hugo --config special.toml,common.toml
use dedicated configDirs and maybe a config file hugo [--config config-file-1.toml] --configDir config-1 hugo [--config config-file-2.toml] --configDir config-2
maybe a combination of both hugo --config global,special.toml --configDir config
use environments
config
├───_default <- global
├───normal
└───gemini