add short feed

This commit is contained in:
arcan1s 2014-06-09 21:53:34 +04:00
parent 01d7e31772
commit 6cf842950b
3 changed files with 62 additions and 0 deletions

View File

@ -13,8 +13,10 @@
<link rel="shortcut icon" href="/resources/icon.ico">
{% if page.category == "ru" %}
<link href="/ru/feed.xml" rel="alternate" title="arcanis' blog" type="application/rss+xml">
<link href="/ru/feed-short.xml" rel="alternate" title="arcanis' blog (только названия)" type="application/rss+xml">
{% else %}
<link href="/feed.xml" rel="alternate" title="arcanis' blog" type="application/rss+xml">
<link href="/feed-short.xml" rel="alternate" title="arcanis' blog (title only)" type="application/rss+xml">
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!--[if lt IE 9]>

30
feed-short.xml Normal file
View File

@ -0,0 +1,30 @@
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>arcanis' blog</title>
<description>arcanis' blog (title only)</description>
<link>{{ site.url }}</link>
<image>
<url>{{ site.url }}/resources/icon-35x35.png</url>
<title>arcanis' blog</title>
<link>{{ site.url }}</link>
</image>
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% for post in site.categories.en limit:10 %}
{% if post.tags contains 'offtop' %}
<!-- do nothing -->
{% else %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.description | xml_escape }}</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endif %}
{% endfor %}
</channel>
</rss>

30
ru/feed-short.xml Normal file
View File

@ -0,0 +1,30 @@
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>arcanis' blog</title>
<description>arcanis' blog (только названия)</description>
<link>{{ site.url }}/ru</link>
<image>
<url>{{ site.url }}/resources/icon-35x35.png</url>
<title>arcanis' blog</title>
<link>{{ site.url }}/ru</link>
</image>
<atom:link href="{{ site.url }}/ru/feed.xml" rel="self" type="application/rss+xml" />
{% for post in site.categories.ru limit:10 %}
{% if post.tags contains 'offtop' %}
<!-- do nothing -->
{% else %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.description | xml_escape }}</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endif %}
{% endfor %}
</channel>
</rss>