Skip to content

Zola Builds Broken RSS/atom feed #2024

@whoisYoges

Description

@whoisYoges

Environment

Zola 0.16.1 running in Arch-Based Linux Distribution

Configuration

generate_feed = true
feed_filename = "atom.xml"

Steps

Enable the above configurations in config.toml
Run zola build or zola serve

Current Behavior

When I try to add the output feed atom.xml in my rss reader (I am using Thunderbird), It gives an error saying It's not a valid Feed.
Validating the feed with w3c feed validator, it shows following errors:

Missing entry element: author
</entry>
title should not be blank
<title></title>

Expected Behavior

The feed should have been validated without any error.

Detected Problem

It generates the feed (atom.xml) with Empty title.

...
...
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title></title>
...
...

Remark

Using feed_filename = "rss.xml" in place generates rss.xml with empty title and description.

...
...
<channel>
<title></title>
<link>http://127.0.0.1:1111</link>
<description></description>
<generator>Zola</generator>
<language>en</language>
...
...

Temporary/Manual Solution

Adding the title manually in atom.xml solved the problem for me or adding title and description manually if you're using rss.xml.

...
...
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title>My Blogs</title>
...
...

Permanent Solution

Zola should detect the default title and description in following priority order or similar appropriate one and use it:

  1. /content/blog/_index.md
  2. /templates/blog.html
  3. config.toml

Reference Project

https://github.com/whoisYoges/website

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions