mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 05:41:31 +00:00
Import the framework.
This commit is contained in:
58
feed.xml
Normal file
58
feed.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
layout: compress
|
||||
# Atom Feed, reference: https://validator.w3.org/feed/docs/atom.html
|
||||
# © 2019 Cotes Chung
|
||||
# MIT License
|
||||
---
|
||||
|
||||
{% capture source %}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<id>{{ site.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>
|
||||
</author>
|
||||
<link href="/feed.xml" rel="self" type="application/atom+xml" />
|
||||
<link href="{{ site.url }}" rel="alternate" type="text/html" />
|
||||
<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 %}
|
||||
<entry>
|
||||
<title>{{ post.title }}</title>
|
||||
<link href="{{ post_absolute_url }}" rel="alternate" type="text/html" title="{{ post.title }}" />
|
||||
<published>{{ post.date | date_to_xmlschema }}</published>
|
||||
{% if post.lastmod %}
|
||||
<updated>{{ post.lastmod | date_to_xmlschema }}</updated>
|
||||
{% else %}
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
{% endif %}
|
||||
<id>{{ post_absolute_url }}</id>
|
||||
<content src="{{ post_absolute_url }}" />
|
||||
<author>
|
||||
<name>{{ site.author }}</name>
|
||||
</author>
|
||||
|
||||
{% if post.categories %}
|
||||
{% for category in post.categories %}
|
||||
<category term="{{ category }}" />
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if post.summary %}
|
||||
<summary>{{ post.summary | strip }}</summary>
|
||||
{% else %}
|
||||
<summary>{{ post.content | strip_html | truncate: 200 }}</summary>
|
||||
{% endif %}
|
||||
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
||||
{% endcapture %}
|
||||
{{ source | replace: '&', '&' }}
|
||||
Reference in New Issue
Block a user