I am trying to build a multilingual blog with this configuration:
languageCode = 'ro-RO'
defaultContentLanguage = 'ro'
title = 'Blog'
theme = 'ananke'
enableEmoji = true
[languages]
[languages.ro]
contentDir = 'content/ro'
disabled = false
languageCode = 'ro'
languageDirection = 'ltr'
languageName = 'Română'
title = 'Blog'
weight = 1
[languages.en]
contentDir = 'content/en'
disabled = false
languageCode = 'en'
languageDirection = 'ltr'
languageName = 'English'
title = 'Blog'
weight = 2
[languages.es]
contentDir = 'content/es'
disabled = false
languageCode = 'es'
languageDirection = 'ltr'
languageName = 'Español'
title = 'Blog'
weight = 3
I want to have posts translated in each language. I start by creating one for the default language with
hugo new content content/ro/my-post.md
When I generate the HTML content with hugo -D
, I can see the post listed in the home page of the default language. Now, when I try to create the same post for the English language with
hugo new content content/en/my-post.md
,
what I see is that the file is created in content/ro/content/en/my-post.md. Also, it is not shown in the English home page but in the home page of the default language (basically, it is duplicated).
I expect this post to be created in content/en/my-post.md and be displayed in the home page of its language.
I can’t understand what is going on or what I am doing wrong