My blog, powerred by Jekyll, serves out a Atom feed.
---
layout: nill
rooturi: http://stefan.artspace44.com
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
...
{% for post in site.posts %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ page.rooturi }}{{ post.url }}" />
<updated>{{post.date | date_to_xmlschema }}</updated>
<id>{{ page.rooturi }}{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}
</feed>
I need to change the content of each post, so that
<img href="/images/01.jpg" />
<a href="/2010/post/">Post</a>
becomes:
<img href="http://stefan.artspace44.com/images/01.jpg" />
<a href="http://stefan.artspace44.com/2010/post/">Post</a>
I was thinking of doing something along the lines of
<content type='html'>
{{ post.content | make_hrefs_base page.rooturi }}
</content>
Where would I code this in jekyll or liquid, and how could I solve the problem of changing only the href values that point to "/" and not "http://otherdomain.com/"?
Thank you