lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
657 stars 362 forks source link

Non-markdown files are not copied across multilingual pages #502

Open ericswpark opened 5 months ago

ericswpark commented 5 months ago

Describe the bug Given the following layout:

blog/
    post-1/
        index.en.md
        index.ko.md
        image-1.png

Hugo ends up generating the following minified structure:

blog
    post-1/
        index.html
        image-1.png
ko/
    blog/
        post-1/
            index.html

Previously (older Hugo version or anatole release?), the image-1.png file was included in both directories, like the following:

blog
    post-1/
        index.html
        image-1.png
ko/
    blog/
        post-1/
            index.html
            image-1.png

This means that linking is broken on non-base languages. This applies to any non-markdown files, like images and Javascript files.

To Reproduce

  1. Set up an example site in the above structure
  2. Build with Hugo
  3. Observe breakage

Expected behavior

Either Hugo+Anatole should copy over the files, or there should be some sort of mapping so that non-base language translation HTML files map to the files in the base language translation path.

Desktop (please complete the following information):

Additional context

This was previously not the case and my website worked fine, but I think a recent update to either Hugo or Anatole changed the behavior. I was wondering if anybody else ran into the same problem and if there's a correct way of linking to the files so that they get mapped correctly or duplicated into different language paths.