comparison piecrust/resources/prepare/atom.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
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 <feed xmlns="http://www.w3.org/2005/Atom">
14 <title>{{site.title}}</title>
15 {% if page.description %}
16 <subtitle>{{page.description}}</subtitle>
17 {% else %}
18 <subtitle>Latest news from {{site.title}}</subtitle>
19 {% endif %}
20 <link href="{{page.url}}" rel="self" />
21 <link href="{{site.root}}" />
22 <id>{{site.root}}</id>
23 <updated>{{now|atomdate}}</updated>
24
25 {% for post in blog.posts.limit(page.post_count) %}
26 {% set author = site.author %}
27 {% if post.author %}{% set author = post.author %}{% endif %}
28 {% if not author %}{{pcfail("Atom feeds require an author for each post. You can specify a global author with the 'site.author' config.")}}{% endif %}
29 <entry>
30 <title>{{post.title}}</title>
31 <link href="{{post.url}}" />
32 <link rel="alternate" type="text/html" href="{{post.url}}"/>
33 <id>{{post.url}}</id>
34 <updated>{{post.timestamp|atomdate}}</updated>
35 <content type="html">{{post.content}}
36 {% if post.has_more and page.read_more_text %}
37 {{ ("<a href=\"" ~ post.url ~ "\">" ~ page.read_more_text ~ "</a>")|escape }}
38 {% endif %}
39 </content>
40 {% if author %}
41 <author>
42 <name>{{author}}</name>
43 </author>
44 {% endif %}
45 </entry>
46 {% endfor %}
47
48 </feed>