-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed-python.xml
More file actions
45 lines (45 loc) · 2.09 KB
/
feed-python.xml
File metadata and controls
45 lines (45 loc) · 2.09 KB
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
---
layout: null
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<link href="{{ '/feed-python.xml' | absolute_url }}" rel="self" type="application/atom+xml"/>
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html"/>
{% assign python_posts = site.posts | where_exp: "post", "post.tags contains 'python'" | slice: 0, 20 %}
{% if python_posts.size > 0 %}
<updated>{{ python_posts.first.date | date_to_xmlschema }}</updated>
{% else %}
<updated>{{ site.time | date_to_xmlschema }}</updated>
{% endif %}
<id>{{ '/' | absolute_url }}</id>
<title type="html">{{ site.title | xml_escape }} — Python</title>
{% if site.description %}
<subtitle>{{ site.description | xml_escape }}</subtitle>
{% endif %}
{% if site.author %}
<author>
<name>{{ site.author.name | xml_escape }}</name>
{% if site.author.email %}<email>{{ site.author.email | xml_escape }}</email>{% endif %}
{% if site.author.uri %}<uri>{{ site.author.uri | xml_escape }}</uri>{% endif %}
</author>
{% endif %}
{% for post in python_posts %}
<entry>
<title type="html">{{ post.title | xml_escape }}</title>
<link href="{{ post.url | absolute_url }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}"/>
<published>{{ post.date | date_to_xmlschema }}</published>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ post.id | absolute_url }}</id>
<content type="html" xml:base="{{ post.url | absolute_url }}">{{ post.content | xml_escape }}</content>
<author>
<name>{% if post.author %}{{ post.author | xml_escape }}{% else %}{{ site.author.name | xml_escape }}{% endif %}</name>
{% unless post.author %}<email>{{ site.author.email | xml_escape }}</email>{% endunless %}
</author>
{% if post.description %}<summary type="html">{{ post.description | xml_escape }}</summary>{% endif %}
{% for tag in post.tags %}
<category term="{{ tag | xml_escape }}"/>
{% endfor %}
</entry>
{% endfor %}
</feed>