Skip to content

Commit f962370

Browse files
authored
Add attributes to base_url link in atom template (getzola#2261)
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.
1 parent 66f5bf5 commit f962370

File tree

1 file changed

+3
-3
lines changed
  • components/templates/src/builtins

1 file changed

+3
-3
lines changed

components/templates/src/builtins/atom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
{%- if config.description %}
99
<subtitle>{{ config.description }}</subtitle>
1010
{%- endif %}
11-
<link href="{{ feed_url | safe }}" rel="self" type="application/atom+xml"/>
12-
<link href="
11+
<link rel="self" type="application/atom+xml" href="{{ feed_url | safe }}"/>
12+
<link rel="alternate" type="text/html" href="
1313
{%- if section -%}
1414
{{ section.permalink | escape_xml | safe }}
1515
{%- else -%}
@@ -41,7 +41,7 @@
4141
</name>
4242
</author>
4343
{% endfor %}
44-
<link rel="alternate" href="{{ page.permalink | safe }}" type="text/html"/>
44+
<link rel="alternate" type="text/html" href="{{ page.permalink | safe }}"/>
4545
<id>{{ page.permalink | safe }}</id>
4646
{% if page.summary %}
4747
<summary type="html">{{ page.summary }}</summary>

0 commit comments

Comments
 (0)