summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-03-08 21:42:56 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-03-08 21:42:56 +0100
commit45459c3a2086aa47f35b90ecc5e658fdc72e7982 (patch)
tree2f0598c3aea058ebff9029dd8b55f1ec9907c36e /data/templates
parent64b640f97d00c119ef4ed4c8ccf8e588226bfcad (diff)
downloadhakyll-45459c3a2086aa47f35b90ecc5e658fdc72e7982.tar.gz
Added renderAtom, feeds now validate.
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/atom-item.xml7
-rw-r--r--data/templates/atom.xml13
-rw-r--r--data/templates/rss-item.xml2
-rw-r--r--data/templates/rss.xml5
4 files changed, 26 insertions, 1 deletions
diff --git a/data/templates/atom-item.xml b/data/templates/atom-item.xml
new file mode 100644
index 0000000..78bdac7
--- /dev/null
+++ b/data/templates/atom-item.xml
@@ -0,0 +1,7 @@
+<entry>
+ <title>$title</title>
+ <link href="$absolute/$url" />
+ <id>$absolute/$url</id>
+ <updated>$timestamp</updated>
+ <summary>$description</summary>
+</entry>
diff --git a/data/templates/atom.xml b/data/templates/atom.xml
new file mode 100644
index 0000000..578f54f
--- /dev/null
+++ b/data/templates/atom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>$title</title>
+ <link href="$absolute/$url" rel="self" />
+ <link href="$absolute" />
+ <!-- We use the link as id. -->
+ <id>$absolute/$url</id>
+ <author>
+ <name>$authorName</name>
+ </author>
+ <updated>$timestamp</updated>
+ $body
+</feed>
diff --git a/data/templates/rss-item.xml b/data/templates/rss-item.xml
index 794a036..fcfc2a5 100644
--- a/data/templates/rss-item.xml
+++ b/data/templates/rss-item.xml
@@ -3,4 +3,6 @@
<link>$absolute/$url</link>
<description>$description</description>
<pubDate>$timestamp</pubDate>
+ <!-- We use the link as id. -->
+ <guid>$absolute/$url</guid>
</item>
diff --git a/data/templates/rss.xml b/data/templates/rss.xml
index 3a58d08..cbf0b16 100644
--- a/data/templates/rss.xml
+++ b/data/templates/rss.xml
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf8"?>
-<rss version="2.0">
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>$title</title>
<link>$absolute</link>
<description>$description</description>
+ <atom:link href="$absolute/$url" rel="self"
+ type="application/rss+xml" />
+ <lastBuildDate>$timestamp</lastBuildDate>
$body
</channel>
</rss>