getzola/zola

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

クローズ

#2,360 opened on 2023/11/21

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)Rust (1,046 件のフォーク)batch import
buggood first issue

Repository metrics

Stars
 (15,349 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド