Добавлен atom feed

This commit is contained in:
Anton Vakhrushev 2019-07-30 21:16:33 +03:00
parent 48f6720e0d
commit 302fe6b18e
3 changed files with 33 additions and 1 deletions

View File

@ -1,2 +1,4 @@
---
title: Антон Вахрушев
author: Антон Вахрушев
email: anton@vakhrushev.me

30
source/atom.xml Normal file
View File

@ -0,0 +1,30 @@
---
use: ["articles"]
permalink: none
sitemap:
_exclude: yes
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[{{ site.title }}]]></title>
<link href="{{ site.url }}/atom.xml" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ site.calculated_date | date('c') }}</updated>
<id>{{ site.url }}/</id>
{% if site.author or site.email %}
<author>
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
{% if site.email %}<email><![CDATA[{{ site.email }}]]></email>{% endif %}
</author>
{% endif %}
<generator uri="http://sculpin.io/">Sculpin</generator>
{% for article in data.articles|slice(0, 10) %}
<entry>
<title type="html"><![CDATA[{{ article.title }}]]></title>
<link href="{{ site.url }}{{ article.url }}"/>
<updated>{{ article.date|date('c') }}</updated>
<id>{{ site.url }}{{ article.url }}</id>
<content type="html"><![CDATA[{{ article.blocks.content|raw }}]]></content>
</entry>
{% endfor %}
</feed>

View File

@ -1,7 +1,7 @@
---
permalink: none
sitemap:
_exclude: yes
_exclude: yes
---
User-agent: *
Sitemap: {{ site.url }}/sitemap.xml