Fix baseUrl on rss-feed (#259)

This commit is contained in:
Cotes Chung 2021-01-18 22:17:03 +08:00
parent e92cc239c1
commit 0194bbced9
1 changed files with 6 additions and 5 deletions

View File

@ -9,23 +9,24 @@ layout: compress
{% capture source %}
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ site.url }}</id>
<id>{{ "/" | absolute_url }}</id>
<title>{{ site.title }}</title>
<subtitle>{{ site.description }}</subtitle>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<author>
<name>{{ site.author }}</name>
<uri>{{ site.url }}</uri>
<uri>{{ "/" | absolute_url }}</uri>
</author>
<link href="/feed.xml" rel="self" type="application/atom+xml" />
<link href="{{ site.url }}" rel="alternate" type="text/html" />
<link rel="self" type="application/atom+xml" href="{{ page.url | absolute_url }}"/>
<link rel="alternate" type="text/html" hreflang="{{ site.lang | default: 'en' }}"
href="{{ '/' | absolute_url }}"/>
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<rights> © {{ 'now' | date: '%Y' }} {{ site.author }} </rights>
<icon>{{ site.baseurl }}/assets/img/favicons/favicon.ico</icon>
<logo>{{ site.baseurl }}/assets/img/favicons/favicon-96x96.png</logo>
{% for post in site.posts limit: 5 %}
{% assign post_absolute_url = site.url | append: post.url %}
{% assign post_absolute_url = post.url | absolute_url %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ post_absolute_url }}" rel="alternate" type="text/html" title="{{ post.title }}" />