You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the lang parameter in _config.yml, Jekyll seems to interpret the unquoted language code "no" (for Norwegian) as the English word "no" rather than a valid language code and uses the default of "en" instead.
Workaround is to use quotes around the language code.
However this is not according to the documented syntax and does not seem to be needed with other language codes like french (fr).
Please investigate whether this is a bug in Jekyll's handling of language codes or if this behavior is documented and requires a specific syntax.
The text was updated successfully, but these errors were encountered:
While perhaps surprising, this is documented behavior of YAML. no is treated as boolean false by YAML. As you've already found, quotes are the correct way to represent the string "no".
So definitely not a bug in Jekyll itself, but were there any specific Jekyll docs that led you astray?
Operating System
Debian 12
Ruby Version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]
Jekyll Version
jekyll 4.3.3
GitHub Pages Version
No response
Expected Behavior
'lang: no' in _config.yml should sent the language to Norwegian.
Thus the html header should be
Current Behavior
When setting the lang parameter in _config.yml, Jekyll seems to interpret the unquoted language code "no" (for Norwegian) as the English word "no" rather than a valid language code and uses the default of "en" instead.
This unexpected behavior requires workarounds and suggests a potential bug.
Relevant log output
No response
Code Sample
Create a new Jekyll project or modify an existing one.
In the _config.yml file, set the following:
lang: no # Unquoted language code does not work as expected
Build or serve the Jekyll site. Observe the resulting language settings shown as:
Change the _config.yml setting to:
lang: "no" # Quoted language code works correctly
Rebuild or reserve the site. The Norwegian language setting should now be applied.
Workaround is to use quotes around the language code.
However this is not according to the documented syntax and does not seem to be needed with other language codes like french (fr).
Please investigate whether this is a bug in Jekyll's handling of language codes or if this behavior is documented and requires a specific syntax.
The text was updated successfully, but these errors were encountered: