-
Notifications
You must be signed in to change notification settings - Fork 972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config.toml contains both default language specific information
warning incorrectly displays for any multilingual site
#2137
Comments
I think this is the culprit: zola/components/config/src/config/mod.rs Line 228 in ce0a0bb
and
I'd be happy to open a PR to fix this, but I'm relatively new to Rust so I don't know the exact fix. Would the right move here be to define a proper default for LanguageOptions? |
We probably need to define a custom |
Let me know if you want to do it, I'd like to include that in a release this week |
Sure I'd be interested in picking this up. The timeframe for completion would be ideally before Friday? |
Before Sunday should be fine |
Hi, I'm getting this issue and since I'm very new to zola, I have no idea what to do. What I'm doing pretty much is that I took https://github.com/gersonbenavides/ataraxia-zola and https://github.com/gersonbenavides/gersonbenavides.github.io and I'm now trying to copy stuff one by one. My The error on my console:
Those errors are probably not related but that warning is. Sorry for the noobishness of my message. |
I have now commented the other languages, only
edit Ok, apparently I had |
Exactly, that was the issue. It just warns you something is defined in multiple places but doesn't really tell you what |
I encountered the same errors with ataraxia-zola, but not the warnings since I didn't add any additional languages. However, I discovered that the cause of the error is likely due to having multiple languages specified in the languages section by default, such as "en" and "es". After removing the Spanish language text ("es"), I resolved the error, and now it's working fine. I kindly request the maintainers of ataraxia-zola to check on this. |
Bug Report
Environment
Zola version: zola 0.17.1
Expected Behavior
This warning should only display whenever the condition it describes (
config.toml
containing both default language specific information at base and under another language section) is true.Current Behavior
This warning currently incorrectly displays any time a site is configured with a
[languages.XX]
section in theconfig.toml
, even when neither the base section or language section has language specific information.Step to reproduce
Do a
zola init
in an empty directory, leave all options to their defaults.In the
config.toml
, add empty[languages]
and[languages.en]
sections, and (optional) removebuild_search_index
key. You should have this left:config.toml
Run
zola serve
. Note the warning appears even though there's no language-specific information in either the base section oren
language section.The text was updated successfully, but these errors were encountered: