forked from cotes2020/jekyll-theme-chirpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.xml
60 lines (55 loc) · 2.01 KB
/
feed.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
layout: compress
# Atom Feed, reference: https://validator.w3.org/feed/docs/atom.html
---
{% capture source %}
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ "/" | absolute_url }}</id>
<title>{{ site.title }}</title>
<subtitle>{{ site.description }}</subtitle>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<author>
<name>{{ site.social.name }}</name>
<uri>{{ "/" | absolute_url }}</uri>
</author>
<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.social.name }} </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 = post.url | absolute_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.last_modified_at %}
<updated>{{ post.last_modified_at | date_to_xmlschema }}</updated>
{% else %}
<updated>{{ post.date | date_to_xmlschema }}</updated>
{% endif %}
<id>{{ post_absolute_url }}</id>
<content src="{{ post_absolute_url }}" />
<author>
<name>{{ site.social.name }}</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>
{% include no-linenos.html content=post.content %}
{{ content | strip_html | truncate: 400 }}
</summary>
{% endif %}
</entry>
{% endfor %}
</feed>
{% endcapture %}
{{ source | replace: '&', '&' }}