404 Error with multi language setup

Hi,

I had no problem building a single lang site (english) in Hugo. All routes worked for example /about /contact etc etc.

I have now added another language to the site (irish) all my original files are now in
content/en with the new files going into content/ie

My config.toml

baseUrl = “http://localhost
DefaultContentLanguage = “en”
defaultContentLanguageInSubdir = true
languageCode = “en-us”
title = “Test Site”

[languages]
[languages.en]
contentDir = “content/en”
languageName = “English”
weight = 1
[languages.ie]
contentDir = “content/ie”
languageName = “Gaeilge”
weight = 2

My content directory looks like
content/en/index.html
content/en/about.html
content/en/contact.html
content/ie/index.html
content/ie/about.html
content/ie/contact.html

both index pages get served no problem
/en and /ie

however /en/about and /en/contact 404 for both languages

I am starting Hugo using
$ hugo server -D --verbose --ignoreCache
| EN | IE
-------------------±----±-----
Pages | 9 | 9
Paginator pages | 0 | 0
Non-page files | 0 | 0
Static files | 596 | 596
Processed images | 0 | 0
Aliases | 1 | 0
Sitemaps | 2 | 1
Cleaned | 0 | 0

$ hugo env
hugo v0.81.0+extended darwin/amd64 BuildDate=unknown
GOOS=“darwin”
GOARCH=“amd64”
GOVERSION=“go1.16”

Hopefully its something simple,
Thanks in advance.
Gearoid

Rename content/en/index.html to content/en/_index.html

Rename content/ie/index.html to content/ie/_index.html

Thank you @jmooring thank you, you are a gent - worked a treat.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.