add rss support

This commit is contained in:
arcan1s
2014-06-09 18:08:37 +04:00
parent 7efb4a3698
commit 6199807c21
9 changed files with 61 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Evgeniy Alekseev wrote this file. As long as you retain this notice you can do w
<li>Исходная тема была создана <a href="https://github.com/orderedlist/minimal">Steve Smith</a> и лицензирована под <a href="http://creativecommons.org/licenses/by/3.0">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.</li>
<li>Disqus, который используется для блока комментариев, имеет собственную <a href="http://help.disqus.com/customer/portal/articles/466260-terms-of-service">кастомную лицензию</a>.</li>
<li>Код для спойлеров был предложен <a href="http://www.cyberforum.ru/post5368179.html">markeley</a> и <a href="http://habrahabr.ru/post/167151/">Defff</a>, и, судя по всему, он не имеет никакой лицензии.</li>
<li>Данный сайт использует RSS шаблон, который был предложен <a href="https://github.com/snaptortoise/jekyll-rss-feeds">snaptortoise</a>.</li>
<li>Google Custom Search имеет собственную <a href="https://support.google.com/customsearch/answer/1714300">кастомную лицензию</a>.</li>
<li>Sharethis тоже имеет собственную <a href="http://www.sharethis.com/legal/publisher-terms-of-use">кастомную лицензию</a>.</li>
</ul>

24
ru/feed.xml Normal file
View File

@ -0,0 +1,24 @@
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.name | xml_escape }}</title>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/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_to_string }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endif %}
{% endfor %}
</channel>
</rss>

View File

@ -14,6 +14,7 @@ title: arcanis
<label class="spoiler">
<input type="checkbox" tabindex="-1">
<div class="box">
<a href="/ru/feed.xml"><img src="/resources/feed-icon-14x14.png"></a>
<a href="/ru/blog/">Блог</a> <span class="close">(скрыть)</span><span class="open">(показать)</span>
<blockquote>
{% for post in site.categories.ru limit:3 %}