Multilingual site duplicates assets

Hi everyone,

I managed to setup and use Hugo pretty fast and I have to commend you guys on the work you did because it’s an amazing platform.

There’s a few issues that I wasn’t able to fix by myself concerning content organisation and the files that it generates.

  1. Sitemap Index generation

Sitemaps are generated but no sitemap index to be seen anywhere.

  1. Duplicated assets

My theme uses some local images, CSS stylesheets and JS scripts that are minified and the permalink is then used for the src or href attribute value.
The issue is that these assets are duplicated for each site language and placed at the root of the language directory instead of the root of the public directory.
This means that even though the files are identical, users would need to download them all over again when they switch languages.

  1. Permalink unchanged by mutation

This might be unrelated to the multilingual option but it seems that if a language root homepage has a list of posts in that language, the pages generated for the pagination results in the /en/page directory will have a permalink equal to /en/ instead of /en/page/1/

My file structure looks like this:


Sections at level 1 and 2 all have files to set a custom title.

My config file looks like this:

theme = "mytheme"

  blog = "/:sections/:slug"

    baseURL = ""
    contentDir = "content/en/"
    languageName = "English"
    languageCode = "en-US"

    baseURL = ""
    contentDir = "content/fr/"
    languageName = "Français"
    languageCode = "fr-FR"

    baseURL = ""
    contentDir = "content/es/"
    languageName = "Español"
    languageCode = "es-ES"

Thanks in advance!

Has anyone managed to fix the issues I mentioned above?
Help is definitely appreciated!