getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
12.96k stars 919 forks source link

Zola 0.19 config.generate_feeds not accessible from template files. #2537

Closed Jieiku closed 1 week ago

Jieiku commented 1 week ago

Bug Report

I believe this is related to https://github.com/getzola/zola/pull/2477

Environment

Zola version: 0.19

Expected Behavior

config.generate_feeds accessible via templates

Current Behavior

config.generate_feeds is not accessible

Step to reproduce

git clone https://github.com/Jieiku/feeds
cd feeds
~/zola serve

look at the generated page and the source in templates/index.html

templates/index.html is simply:

{# Works in 0.18.0+: #}
  {%- if config.generate_feed %}
    0.18: {{ config.generate_feed }}
  {%- endif %}

{# Does not work in 0.19.0: #}
  {%- if config.generate_feeds %}
    0.19: {{ config.generate_feeds }}
  {%- endif %}
Jieiku commented 1 week ago

This appears to actually be even stranger than I originally thought.

setting generate_feeds = true in config.toml and using zola 0.19 then makes generate_feed have a value of true even though it is nowhere to be found in config.toml, meanwhile generate_feeds is either inaccessible or false.

Keats commented 1 week ago

Ah yes it's mispelled in the config serializer 🤦

generate_feed: options.generate_feeds,

I'll fix that