tut
June 23, 2022, 7:14pm
1
What do these warnings mean?
$ hugo serve
WARN 2022/06/20 22:09:06 Unknown Sitemap field: defaultcontentlanguage
WARN 2022/06/20 22:09:06 Unknown Sitemap field: defaultcontentlanguageinsubdir
WARN 2022/06/20 22:09:06 Unknown Sitemap field: defaultcontentlanguage
WARN 2022/06/20 22:09:06 Unknown Sitemap field: defaultcontentlanguageinsubdir
1 - that it seems you have a problem in your config.toml
because defaultContentLanguage
is a variable and not a value, or that your call to this variable is wrong
2 - that we need you to buy us a crystal ball to tell more.
tut
June 23, 2022, 11:41pm
3
See this topic for the configuration…
Borrowing from this example , is it possible to show the “Translations” option at the top of the page only if the default language page has a corresponding translated page in the secondary language folder?
I was thinking of doing translations to some content on a schedule but would like to post the translated pages as soon as they are done. But I don’t want the translations option to show up unless these pages have corresponding translated pages.
Removing this part and the warnings disappear
defaultContentLanguage = 'en'
defaultContentLanguageInSubdir = true
These settings must be in the root of your config.toml file:
defaultContentLanguage
defaultContentLanguageInSubdir
I suspect that you have placed them within the sitemap
table.
If you continue to have problems, post your entire site configuration.
tut
June 24, 2022, 1:06am
5
Sitemap was the last table in the config and I placed the language codes at the end. So, you are right that might have interfered with it. I moved the code higher up.
system
Closed
June 26, 2022, 1:06am
6
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.