我的博客由Jekyll提供,提供Atom订阅源。扩展Jekyll和Liquid解析帖子内容
---
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>
我需要更改每个帖子的内容,使
<img href="/images/01.jpg" />
<a href="/2010/post/">Post</a>
变为:
<img href="http://stefan.artspace44.com/images/01.jpg" />
<a href="http://stefan.artspace44.com/2010/post/">Post</a>
我想沿着
线做某事<content type='html'>
{{ post.content | make_hrefs_base page.rooturi }}
</content>
会在哪里我jekyll或liquid代码这一点,我怎么能解决只改变HREF值指向“/ ”,而不是“http://otherdomain.com/”的问题呢?
谢谢