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

View file

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