Skip to content
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

Unnecessary configuration or unnecessary warning with generate_feed in multilingual site #2360

Open
ogarcia opened this issue Nov 21, 2023 · 2 comments

Comments

@ogarcia
Copy link

ogarcia commented Nov 21, 2023

Bug Report

Environment

Zola version: 0.17.2

Current Behavior

Given this configuration.

config.toml
base_url = "https://example.com"
compile_sass = false
build_search_index = false
generate_feed = true
default_language = "es"

[markdown]
highlight_code = true

[languages.es]
generate_feed = true
title = "Título molón"
description = "Descripción molona"

[languages.en]
generate_feed = true
title = "Fancy title"
description = "Fancy description"

And this content files (optional but to generate atom.xml).

content/hello.md
+++
title = "Hola"
date = 2023-11-21
+++

Hola
content/hello.en.md
+++
title = "Hi"
date = 2023-11-21
+++

Hi

Running zola serve or zola build gives this warning:

Warning: config.toml contains both default language specific information at base and under section [languages.es], which may cause merge conflicts. Please use only one to specify language specific information

I know the culprit is defining generate_feed globally outside the language blocks ([languages.es] and [languages.en]), but the problem is that if you don't define it there the feed is not generated.

Expected Behavior

In my view, if the generate_feed entry is to be defined in the [language.xx] sections, it should not be necessary to define it globally as well. Or at least, if it is necessary to do so then it should not give that warning.

@Keats
Copy link
Collaborator

Keats commented Nov 22, 2023

I know the culprit is defining generate_feed globally outside the language blocks ([languages.es] and [languages.en]), but the problem is that if you don't define it there the feed is not generated.

Hmm that sounds like a bug for the default language.

@Keats Keats added the bug label Nov 22, 2023
@Keats
Copy link
Collaborator

Keats commented Dec 7, 2023

Yup we have a if self.config.generate_feed check in the code. Should be an easy fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants