-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
atom.xml is not valid #1223
Comments
Hmm I didn't know author was mandatory... |
This is my template that validate: <?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{ lang }}">
<title>{{ config.title }}
{%- if term %} - {{ term.name }}
{%- elif section.title %} - {{ section.title }}
{%- endif -%}
</title>
{%- if config.description %}
<subtitle>{{ config.description }}</subtitle>
{%- endif %}
<link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
<link href="
{%- if section -%}
{{ section.permalink | escape_xml | safe }}
{%- else -%}
{{ config.base_url | escape_xml | safe }}
{%- endif -%}
"/>
<generator uri="https://www.getzola.org/">Zola</generator>
<updated>{{ last_updated | date(format="%+") }}</updated>
<id>{{ feed_url | safe }}</id>
{%- for page in pages %}
{%- if not page.extra.ignore_feed %}
<entry xml:lang="{{ page.lang }}">
<title>{{ page.title }}</title>
<published>{{ page.date | date(format="%+") }}</published>
<updated>{{ page.updated | default(value=page.date) | date(format="%+") }}</updated>
<link href="{{ page.permalink | safe }}" type="text/html"/>
<id>{{ page.permalink | safe }}</id>
<author>
<name>{{ page.extra.author | default(value=config.extra.author) }}</name>
</author>
<content type="html">
{{ page.content }}
</content>
</entry>
{%- endif %}
{%- endfor %}
</feed>
|
Yeah the only issue is that author would be optional so it's possible that no one fills it. Would an empty value for the author still validate? It's also annoying since if we want to ensure validation, we'd likely need to promote author out of extra which sucks :/ |
Closing as duplicate of #2024 which is less likely to be forgotten as it's more recent and has some ideas. |
Bug Report
Environment
Zola version: 0.12.2
Expected Behavior
Valid atom.xml from W3C Validation Service
Current Behavior
Not valid.
<author>
,<author>
should be added by whole feed or by every entry.<content>
part should beStep to reproduce
Submit a Zola atom feed to the W3C Validation Service
The text was updated successfully, but these errors were encountered: