I have 5 languages defined. I’ve been running hugo server for local development as:
hugo server -D -F --disableFastRender --baseURL http://127.0.0.1:1313 --config "config.de.toml,config.es.toml,config.ru.toml,config.toml,config.uk.toml,config.en.toml,dev.toml"
This takes about 8 seconds to render.
dev.toml overrides the baseURL values for en and es from domain names to blank. This makes internal links work correctly in server mode.
Whenever I restart hugo server, each language seems randomly assigned to a port. Since I usually only need English, I thought maybe I could speed up rendering and have a consistent port so browser URL memory would always take me to the right page. So I tried:
HUGO_DISABLELANGUAGES="uk ru de es" hugo server -D -F --disableFastRender --baseURL http://127.0.0.1:1313 --config "config.toml,config.en.toml,dev.toml"
This takes 14 seconds to render. 127.0.0.1:1313 displays an empty page. No header or footer or content.
I tried copying dev.toml to dev-en.toml and removing the es baseURL override:
HUGO_DISABLELANGUAGES="uk ru de es" hugo server -D -F --disableFastRender --baseURL http://127.0.0.1:1313 --config "config.toml,config.en.toml,dev-en.toml"
This takes 22 seconds to render. English displays at 127.0.0.1:1313 with the correct baseURL. Links to single pages work. Category pages have header and footer, but no content.
I assume part of the problem so far is something bep noted when he was planning multilingual server: any content in a language for which no config.toml exists, will have that content rendered under the default language.
So I tried:
HUGO_DISABLELANGUAGES="uk ru de es" hugo server -D -F --disableFastRender --baseURL http://127.0.0.1:1313 --config "config.toml,config.en.toml,config.es.toml,config.ru.toml,config.uk.toml,config.de.toml,dev.toml"
This renders in 2.2 seconds, so it seems to be correctly ignoring all languages except English. However, the display at 127.0.0.1:1313 is once again a blank page.
Am I missing something, or doing something wrong? Or is it not supported to disable languages in server mode?
A secondary question: is it possible to specific which port will be used for which language, to keep it consistent each time hugo server runs?