snipt/templates/rss.xml

25 lines
1.4 KiB
XML
Raw Normal View History

2015-09-28 10:29:08 -07:00
{% load truncate_lines %}
2012-05-14 21:06:34 -07:00
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
2012-04-13 20:30:23 -07:00
<channel>
2019-01-21 15:21:25 -08:00
<atom:link href="https://snippets.siftie.com{{ request.get_full_path }}" rel="self" type="application/rss+xml" />
<description>{% if public and not public_user %}Public snipts{% else %}Snippets by {{ user.username }}{% endif %}{% if tag %} tagged with "{{ tag }}"{% endif %}</description>
<title>/ {% if public and not public_user %}public{% else %}{{ user.username }}{% endif %}{% if tag %} / {{ tag }}{% endif %} - Siftie Snippets</title>
<link>https://snippets.siftie.com{{ request.path }}</link>
2012-06-18 09:39:36 -07:00
{% for snipt in snipts %}
2012-04-13 20:30:23 -07:00
<item>
<title>{{ snipt.title }}</title>
2012-05-14 21:02:53 -07:00
<link>{{ snipt.get_full_absolute_url }}</link>
2015-09-28 10:28:18 -07:00
{% if snipt.line_count > 300 %}
<description><![CDATA[{{ snipt.code|truncate_lines }}]]></description>
{% else %}
<description><![CDATA[{{ snipt.code }}]]></description>
{% endif %}
<tags>{% for tag in snipt.tags.all %}{{ tag }}{% if not forloop.last %}, {% endif %}{% endfor %}</tags>
2012-05-14 21:02:53 -07:00
<pubDate>{{ snipt.created|date:"r" }}</pubDate>
2019-01-21 15:21:25 -08:00
<guid isPermaLink="false">siftie-snippets-com-{{ snipt.id }}</guid>
2012-06-18 09:39:36 -07:00
</item>
{% endfor %}
2012-04-13 20:30:23 -07:00
</channel>
</rss>