Skip to content

Commit

Permalink
Add attributes to base_url link in atom template (getzola#2261)
Browse files Browse the repository at this point in the history
The `rel` and `type` HTML attributes are needed in the `base_url` (or
`section.permalink`) link so feed aggregators know that's the HTML page
that corresponds to the atom feed.

Note: The RSS template doesn't have this issue.
  • Loading branch information
savq committed Jul 27, 2023
1 parent 66f5bf5 commit f962370
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/templates/src/builtins/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{%- if config.description %}
<subtitle>{{ config.description }}</subtitle>
{%- endif %}
<link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
<link href="
<link rel="self" type="application/atom+xml" href="{{ feed_url | safe }}"/>
<link rel="alternate" type="text/html" href="
{%- if section -%}
{{ section.permalink | escape_xml | safe }}
{%- else -%}
Expand Down Expand Up @@ -41,7 +41,7 @@
</name>
</author>
{% endfor %}
<link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/>
<link rel="alternate" type="text/html" href="{{ page.permalink | safe }}"/>
<id>{{ page.permalink | safe }}</id>
{% if page.summary %}
<summary type="html">{{ page.summary }}</summary>
Expand Down

0 comments on commit f962370

Please sign in to comment.