Mercurial > piecrust2
comparison piecrust/resources/prepare/rss.html @ 3:f485ba500df3
Gigantic change to basically make PieCrust 2 vaguely functional.
- Serving works, with debug window.
- Baking works, multi-threading, with dependency handling.
- Various things not implemented yet.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 10 Aug 2014 23:43:16 -0700 |
parents | |
children | c3c1171679de |
comparison
equal
deleted
inserted
replaced
2:40fa08b261b9 | 3:f485ba500df3 |
---|---|
1 --- | |
2 description: | |
3 read_more_text: "Read more..." | |
4 language: | |
5 categories: | |
6 ttl: | |
7 layout: none | |
8 format: none | |
9 post_count: 10 | |
10 content_type: xml | |
11 --- | |
12 <?xml version="1.0" encoding="UTF-8"?> | |
13 <rss version="2.0" | |
14 xmlns:atom="http://www.w3.org/2005/Atom" | |
15 xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
16 xmlns:dc="http://purl.org/dc/elements/1.1/"> | |
17 <channel> | |
18 <title>{{site.title}}</title> | |
19 <link>{{site.root}}</link> | |
20 <atom:link href="{{page.url}}" rel="self" type="application/rss+xml" /> | |
21 {% if page.description %} | |
22 <description>{{page.description}}</description> | |
23 {% else %} | |
24 <description>Latest news from {{site.title}}</description> | |
25 {% endif %} | |
26 <lastBuildDate>{{now|date("r")}}</lastBuildDate> | |
27 <pubDate>{{now|date("r")}}</pubDate> | |
28 <generator>PieCrust {{piecrust.version}}</generator> | |
29 {% if page.language %}<language>{{page.language}}</language>{% endif %} | |
30 {% for c in page.categories %} | |
31 <category>{{c}}</category> | |
32 {% endfor %} | |
33 {% if page.ttl %}<ttl>{{page.ttl}}</ttl>{% endif %} | |
34 | |
35 {% for post in blog.posts.limit(page.post_count) %} | |
36 {% set author = site.author %} | |
37 {% if post.author %}{% set author = post.author %}{% endif %} | |
38 <item> | |
39 <title>{{post.title}}</title> | |
40 <link>{{post.url}}</link> | |
41 {% if author %} | |
42 <author>{{author}}</author> | |
43 <dc:creator>{{author}}</dc:creator> | |
44 {% endif %} | |
45 {% if post.category %}<category>{{post.category}}</category>{% endif %} | |
46 {% for t in post.tags %} | |
47 <category>{{t}}</category> | |
48 {% endfor %} | |
49 <pubDate>{{post.timestamp|date("r")}}</pubDate> | |
50 <guid>{{post.url}}</guid> | |
51 <description>{{post.content}} | |
52 {% if post.has_more and page.read_more_text %} | |
53 {{ ("<a href=\"" ~ post.url ~ "\">" ~ page.read_more_text ~ "</a>")|escape }} | |
54 {% endif %} | |
55 </description> | |
56 </item> | |
57 {% endfor %} | |
58 | |
59 </channel> | |
60 </rss> |