Skip to content

Commit

Permalink
Merge pull request #141 from annashipman/update-atom
Browse files Browse the repository at this point in the history
Convert relative links to absolute in atom feed
  • Loading branch information
annashipman authored Jul 28, 2024
2 parents 058e2c9 + d2aec40 commit 916f56b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
<link href="https://www.annashipman.co.uk{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>https://www.annashipman.co.uk{{ post.url }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
{% assign content = post.content %}
{% capture href %}href="{{ site.url }}/{% endcapture %}
{% capture src %}src="{{ site.url }}/{% endcapture %}
{% capture converted_content %}
{{ content | replace: 'href="/', href | replace: 'src="/', src }}
{% endcapture %}
<content type="html">{{ converted_content | xml_escape }}</content>
</entry>
{% endfor %}

Expand Down

0 comments on commit 916f56b

Please sign in to comment.