getzola/zola

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

Open

#2,360 创建于 2023年11月21日

在 GitHub 查看
 (5 评论) (0 反应) (0 负责人)Rust (1,046 fork)batch import
buggood first issue

仓库指标

Star
 (15,349 star)
PR 合并指标
 (平均合并 48天 17小时) (30 天内合并 4 个 PR)

描述

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.

贡献者指南