Repository navigation
Expand file tree
/
Copy pathfeed.xml
More file actions
46 lines (46 loc) · 2.79 KB
/
Copy pathfeed.xml
File metadata and controls
46 lines (46 loc) · 2.79 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
46
---
layout: null
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<generator uri="https://jekyllrb.com/" version="{{ jekyll.version }}">Jekyll</generator>
<link href="{{ '/feed.xml' | absolute_url }}" rel="self" type="application/atom+xml" />
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" hreflang="en" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ '/feed.xml' | absolute_url | xml_escape }}</id>
<title type="html">{{ site.title | smartify | xml_escape }}</title>
{% if site.description %}<subtitle>{{ site.description | xml_escape }}</subtitle>{% endif %}
{% assign posts = site.posts | where_exp: "post", "post.hidden != true" %}
{% for post in posts limit: 10 %}
<entry xml:lang="en">
<title type="html">{{ post.title | smartify | strip_html | normalize_whitespace | 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.last_modified_at | default: post.date | date_to_xmlschema }}</updated>
<id>{{ post.id | absolute_url | xml_escape }}</id>
{% comment %}
Ship the NIGHT view: keep base prose and .in-night blocks, strip
spectrum-only <div class="in-beyond"> blocks. String-level filter —
it drops everything from each opening tag to the first following
</div>, so in-beyond blocks in posts must not contain nested divs.
{% endcomment %}
{% assign parts = post.content | split: '<div class="in-beyond">' %}
{% assign night_content = parts[0] %}
{% for part in parts offset: 1 %}{% assign sub = part | split: '</div>' %}{% for s in sub offset: 1 %}{% assign night_content = night_content | append: s %}{% unless forloop.last %}{% assign night_content = night_content | append: '</div>' %}{% endunless %}{% endfor %}{% endfor %}
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{% if post.authorship_note and post.authorship_note != empty %}<p>{{ post.authorship_note | escape }}</p>{% endif %}{{ night_content | strip }}]]></content>
<author>
<name>{{ site.author.name | default: site.author | xml_escape }}</name>
</author>
{% if post.category %}
<category term="{{ post.category | xml_escape }}" />
{% endif %}
{% for tag in post.tags %}
<category term="{{ tag | xml_escape }}" />
{% endfor %}
{% assign post_summary = post.description | default: post.excerpt %}
{% if post_summary and post_summary != empty %}
<summary type="html"><![CDATA[{{ post_summary | strip_html | normalize_whitespace }}]]></summary>
{% endif %}
</entry>
{% endfor %}
</feed>