getzola/zola

Unnecessary configuration or unnecessary warning with `generate_feed` in multilingual site

Open

#2,360 opened on Nov 21, 2023

View on GitHub
 (5 comments) (0 reactions) (0 assignees)Rust (15,349 stars) (1,046 forks)batch import
buggood first issue

Description

Bug Report

Environment

Zola version: 0.17.2

Current Behavior

Given this configuration.

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).

+++
title = "Hola"
date = 2023-11-21
+++

Hola
+++
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.

Contributor guide