Verify that the site.url has a protocol.

This commit is contained in:
juego 2014-05-14 18:02:49 +02:00
parent be76bf2daf
commit 647d014836

View file

@ -5,33 +5,34 @@ layout: none
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title type="text">{{ site.title }}</title> <title type="text">{{ site.title }}</title>
<generator uri="https://github.com/mojombo/jekyll">Jekyll</generator> <generator uri="https://github.com/mojombo/jekyll">Jekyll</generator>
<link rel="self" type="application/atom+xml" href="{{ site.url }}/feed.xml" /> {% if site.url != '' and site.url | split: '/' | first != 'http:' and site.url | split: '/' | first != 'https:' %}{% assign url = site.url | prepend: 'http:' %}{% else %}{% assign url = site.url %}{% endif %}
<link rel="alternate" type="text/html" href="{{ site.url }}/" /> <link rel="self" type="application/atom+xml" href="{{ url }}/feed.xml" />
<link rel="alternate" type="text/html" href="{{ url }}/" />
<updated>{{ site.time | date_to_xmlschema }}</updated> <updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}/</id> <id>{{ url }}/</id>
<author> <author>
<name>{{ site.owner.name }}</name> <name>{{ site.owner.name }}</name>
<uri>{{ site.url }}/</uri> <uri>{{ url }}/</uri>
<email>{{ site.owner.email }}</email> <email>{{ site.owner.email }}</email>
</author> </author>
{% for post in site.posts limit:20 %} {% for post in site.posts limit:20 %}
<entry> <entry>
<title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title> <title type="html"><![CDATA[{{ post.title | cdata_escape }}]]></title>
<link rel="alternate" type="text/html" href="{% if post.link %}{{ post.link }}{% else %}{{ site.url }}{{ post.url }}{% endif %}"/> <link rel="alternate" type="text/html" href="{% if post.link %}{{ post.link }}{% else %}{{ url }}{{ post.url }}{% endif %}"/>
<id>{{ site.url }}{{ post.id }}</id> <id>{{ url }}{{ post.id }}</id>
{% if post.modified %}<updated>{{ post.modified | to_xmlschema }}T00:00:00-00:00</updated> {% if post.modified %}<updated>{{ post.modified | to_xmlschema }}T00:00:00-00:00</updated>
<published>{{ post.date | date_to_xmlschema }}</published> <published>{{ post.date | date_to_xmlschema }}</published>
{% else %}<published>{{ post.date | date_to_xmlschema }}</published> {% else %}<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %} <updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
<author> <author>
<name>{{ site.owner.name }}</name> <name>{{ site.owner.name }}</name>
<uri>{{ site.url }}</uri> <uri>{{ url }}</uri>
<email>{{ site.owner.email }}</email> <email>{{ site.owner.email }}</email>
</author> </author>
{% for tag in post.tags %}<category scheme="{{ site.url }}/tags/#{{ tag | uri_escape }}" term="{{ tag }}" />{% endfor %} {% for tag in post.tags %}<category scheme="{{ url }}/tags/#{{ tag | uri_escape }}" term="{{ tag }}" />{% endfor %}
<content type="html">{{ post.content | xml_escape }} <content type="html">{{ post.content | xml_escape }}
&lt;p&gt;&lt;a href=&quot;{{ site.url }}{{ post.url }}&quot;&gt;{{ post.title }}&lt;/a&gt; was originally published by {{ site.owner.name }} at &lt;a href=&quot;{{ site.url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;</content> &lt;p&gt;&lt;a href=&quot;{{ url }}{{ post.url }}&quot;&gt;{{ post.title }}&lt;/a&gt; was originally published by {{ site.owner.name }} at &lt;a href=&quot;{{ url }}&quot;&gt;{{ site.title }}&lt;/a&gt; on {{ post.date | date: "%B %d, %Y" }}.&lt;/p&gt;</content>
</entry> </entry>
{% endfor %} {% endfor %}
</feed> </feed>