getzola/zola

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

Open

#2,360 建立於 2023年11月21日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Rust (15,349 star) (1,046 fork)batch import
buggood first issue

描述

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.

貢獻者指南

Unnecessary configuration or unnecessary warning with `generate_feed` in multilingual site · getzola/zola#2360 | Good First Issue