custom params on the language top level is deprecated #997
-
Hi there! Thanks for the great theme. Edit Begin: Mo 30. Okt 23:17:53 CET 2023
[de]
languageName = "Deutsch"
weight = 1
#dateFormat = "2. January 2006"
dateFormat = ':date_full'
defaultContentLanguage = "de"
[de.params]
description = "Anleitungen, HowTos, Code-Schnipsel & Blog"
[de.params.archive]
languageName = "Deutsch"
defaultContentLanguage = "de"
dateFormat = "02.01."
description = "Das Archiv der Homepage"
[en]
languageName = "English"
weight = 2
[fr]
languageName = "Français"
weight = 3
[fr.params]
dateFormat = "02-01-2006"
Edit End Mo 30. Okt 23:17:53 CET 2023Actually I use hugo in version 0.119.0 and it throws some warnings
I tried to modify my file [languages]
[languages.de]
languageName = "Deutsch"
weight = 1
dateFormat = ':date_full'
defaultContentLanguage = "de"
[de.params]
description = "Anleitungen, HowTos, Code-Schnipsel & Blog"
[de.params.archive]
languageName = "Deutsch"
defaultContentLanguage = "de"
dateFormat = "02.01."
description = "Das Archiv der Homepage"
[languages.en]
languageName = "English"
weight = 2
[languages.fr]
languageName = "Français"
weight = 3
[fr.params]
dateFormat = "02-01-2006" but there are similar or more warnings /o\
What am I doing wrong? Can someone please help me? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
There are some issues on your configuration:
[de]
languageName = "Deutsch"
weight = 1
defaultContentLanguage = "de"
[de.params]
dateFormat = ':date_full'
description = "Anleitungen, HowTos, Code-Schnipsel & Blog"
[de.params.archive]
languageName = "Deutsch"
defaultContentLanguage = "de"
dateFormat = "02.01."
description = "Das Archiv der Homepage"
[en]
languageName = "English"
weight = 2
[fr]
languageName = "Français"
weight = 3
[fr.params]
dateFormat = "02-01-2006" The rest of warnings are similar, you need to put the custom paramaters below the |
Beta Was this translation helpful? Give feedback.
-
Thank you @razonyang very much for your help. It works now and renders without warnings. So that it may help others, here is my current configuration of [de]
languageName = "Deutsch"
weight = 1
defaultContentLanguage = "de"
[de.params]
dateFormat = ':date_full'
description = "Anleitungen, HowTos, Code-Schnipsel & Blog"
pygmentsUseClasses = true
comment = false
[de.params.archive]
languageName = "Deutsch"
defaultContentLanguage = "de"
dateFormat = "02.01."
description = "Das Archiv der Homepage"
[en]
languageName = "English"
weight = 2
[en.params]
pygmentsUseClasses = true
comment = false
[fr]
languageName = "Français"
weight = 3
[fr.params]
dateFormat = "02-01-2006"
comment = false
[blackfriday.params]
hrefTargetBlank = true |
Beta Was this translation helpful? Give feedback.
There are some issues on your configuration:
languages
, since you're defining the it inlanguages.*
other thanconfig.*
/hugo.*
file.dateFormat
should be put below the[*.params]
,*
represents the language code.config/_default/languages.toml
should be