Hello All,
I was redirected from auto reload does not work for translations · Issue #9873 · gohugoio/hugo · GitHub
Thing is my translated content do not auto reload in 0.98.0. It works OK in 0.96.0
I’ve managed an example here GitHub - agaoglu/hugo-autoreload-example
To reproduce the issue:
Make sure you have hugo v0.98.0.
Clone the repo
hugo server -D
go to localhost:1313/tr/posts/my-first-post/
edit and save the file in content/tr/posts/my-first-post.md
browser is auto reloaded but content not up-to-date
Thanks for any pointers
See:
https://gohugo.io/content-management/multilingual/#translation-by-content-directory
This system uses different content directories for each of the languages .
Your current structure is:
content/
├── posts/
│ └── my-first-post.md
└── tr/
└── posts/
└── my-first-post.md
It should be this:
content/
├── en/
│ └── posts/
│ └── my-first-post.md
└── tr/
└── posts/
└── my-first-post.md
With this site configuration:
[languages.en]
contentDir = 'content/en'
languageCode = 'en-US'
languageName = 'English'
weight = 1
[languages.tr]
contentDir = 'content/tr'
languageCode = 'tr-TR'
languageName = 'Türkçe'
weight = 2
Although your mis-configuration may have worked with an earlier version, it is not supported.
1 Like
I had added the second language after the english version was complete.
I had assumed it would work as the default language in the default content dir.
I’ll just move them now accordingly.
Thanks!
1 Like
system
Closed
May 12, 2022, 5:37pm
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.