Multilingual Site with separate posts directories makes posts available on multiple links

I have my blog generated via Hugo. It is a Multilingual site with two languages available, English (en) and Bengali (bn).

I have my English posts in content/posts directory and Bengali posts at content/bengali/posts; And as usual my posts have standard metadata such as title, lang, description etc.

By default, Bengali posts get generated at URLs sometime like domain.tld/bn/post1. But they are also available at domain.tld/bn/bengali/posts/post1

For this issue, my Related Posts and Next/Previous Post getting filled with duplicate posts of different links of a same post.

My theme is created by me from scratch.

A demo Bengali post with the aforementioned problem, so you folks can check this issue:



Here’s an example of a multilingual site where the content for each language is kept in separate directories.


├── de/
│   ├── posts/
│   │   └──
│   └──
└── en/
    ├── posts/
    │   └──


contentDir = 'content/en'
languageCode = 'en-US'
languageName = 'English'
weight = 1

contentDir = 'content/de'
languageCode = 'de-DE'
languageName = 'Deutsch'
weight = 2

This is documented here:

Thanks. It fixed the duplicate links issue

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