How to make a landing page for a multilingual site

I’m trying to make a multilingual site that has a landing page with language selection. Currently I’ve set up multilingual site so that each language, including default language, is in its own subdirectory. Hugo creates a redirect page to public/index.html but I want to override that. Is there a way to make Hugo generate (or copy) a regular HTML page there?

So far I’ve tried to use content/index.html with frontmatter that says its url is “/index.html”, that didn’t work. Moving that file to content/fi/landing.html didn’t help (the file was used only after I changed url in frontmatter to something else but then the location was obviously wrong). I also tried to use static file index.html which also didn’t work. In all cases public/index.html contains redirect page /fi/index.html (fi being the default language) and not the content that I would like to see. I have no idea what to try next or if Hugo even supports what I want to do.

I didn’t see anything related to this in documentation or on this support forum. I did find a Github issue related to this, but it didn’t have any answers.

I don’t have a definite answer for this, but let’s say you want 2 languages, EN and JP, setup a third language RU and set that as the default. Set the RU homepage as your language selection page, which link to /en/ or /jp/ and keep the /ru/ folder empty besides the language selection page (index.md).

This is called a bad hack.

Edit: Sorry I’m replying to old messages. I’ll stop.

1 Like