aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-10-08 23:57:37 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-10-08 23:57:37 +0000
commitbe55f6fd7cf1a251c3977f857a44ee2769e39d8b (patch)
tree36c09168ec20798e5fd5d1e0725cb8577d816928 /templates
parentbf4e6716cc57eb6d0dfca43ce92b64934950513e (diff)
downloadikiwiki-be55f6fd7cf1a251c3977f857a44ee2769e39d8b.tar
ikiwiki-be55f6fd7cf1a251c3977f857a44ee2769e39d8b.tar.gz
* Atom feed support based on a patch by Clint Adams.
* Add feeds=no option to inline preprocessor directive to turn off all types of feeds. feeds=rss will still work, and feeds=atom was also added, for fine control. * $IkiWiki::version now holds the program version, and is accessible to plugins.
Diffstat (limited to 'templates')
-rw-r--r--templates/atomitem.tmpl20
-rw-r--r--templates/atompage.tmpl15
-rw-r--r--templates/blogpost.tmpl5
-rw-r--r--templates/feedlink.tmpl8
-rw-r--r--templates/page.tmpl2
-rw-r--r--templates/rssitem.tmpl2
-rw-r--r--templates/rsslink.tmpl5
-rw-r--r--templates/rsspage.tmpl5
8 files changed, 51 insertions, 11 deletions
diff --git a/templates/atomitem.tmpl b/templates/atomitem.tmpl
new file mode 100644
index 000000000..e0f7bb4f9
--- /dev/null
+++ b/templates/atomitem.tmpl
@@ -0,0 +1,20 @@
+<entry>
+ <title><TMPL_VAR TITLE ESCAPE=HTML></title>
+ <TMPL_IF NAME="AUTHOR">
+ <author><TMPL_VAR AUTHOR ESCAPE=HTML></author>
+ <TMPL_ELSE>
+ </TMPL_IF>
+ <id><TMPL_VAR URL></id>
+ <link href="<TMPL_VAR PERMALINK>"/>
+ <TMPL_IF NAME="CATEGORIES">
+ <TMPL_LOOP NAME="CATEGORIES">
+ <category><TMPL_VAR CATEGORY></category>
+ </TMPL_LOOP>
+ </TMPL_IF>
+ <updated><TMPL_VAR DATE_3339></updated>
+ <content type="xhtml" xml:lang="en">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ ![CDATA[<TMPL_VAR CONTENT>]]
+ </div>
+ </content>
+</entry>
diff --git a/templates/atompage.tmpl b/templates/atompage.tmpl
new file mode 100644
index 000000000..1c672f484
--- /dev/null
+++ b/templates/atompage.tmpl
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<feed xmlns="http://www.w3.org/2005/Atom">
+<title><TMPL_VAR TITLE ESCAPE=HTML></title>
+<link href="<TMPL_VAR PAGEURL>"/>
+<link href="<TMPL_VAR FEEDURL>" rel="self"/>
+<author>
+<name><TMPL_VAR WIKINAME></name>
+</author>
+<id><TMPL_VAR PAGEURL></id>
+<subtitle type="html"><TMPL_VAR FEEDDESC ESCAPE=HTML></subtitle>
+<generator uri="http://ikiwiki.kitenet.net/" version="<TMPL_VAR VERSION>">ikiwiki</generator>
+<updated><TMPL_VAR FEEDDATE></updated>
+<TMPL_VAR CONTENT>
+</feed>
diff --git a/templates/blogpost.tmpl b/templates/blogpost.tmpl
index 1b93adc14..9fbf9a769 100644
--- a/templates/blogpost.tmpl
+++ b/templates/blogpost.tmpl
@@ -1,7 +1,10 @@
<form action="<TMPL_VAR CGIURL>" method="get">
<div id="blogform">
<TMPL_IF NAME="RSSURL">
-<a class="rssbutton" type="application/rss+xml" href="<TMPL_VAR NAME=RSSURL>">RSS</a>
+<a class="feedbutton" type="application/rss+xml" href="<TMPL_VAR NAME=RSSURL>">RSS</a>
+</TMPL_IF>
+<TMPL_IF NAME="ATOMURL">
+<a class="feedbutton" type="application/atom+xml" href="<TMPL_VAR NAME=ATOMURL>">Atom</a>
</TMPL_IF>
<input type="hidden" name="do" value="blog" />
<input type="hidden" name="from" value="<TMPL_VAR ROOTPAGE>" />
diff --git a/templates/feedlink.tmpl b/templates/feedlink.tmpl
new file mode 100644
index 000000000..2963156c1
--- /dev/null
+++ b/templates/feedlink.tmpl
@@ -0,0 +1,8 @@
+<div id="feedlink">
+<TMPL_IF NAME="RSSURL">
+<a class="feedbutton" type="application/rss+xml" href="<TMPL_VAR NAME=RSSURL>">RSS</a>
+</TMPL_IF>
+<TMPL_IF NAME="ATOMURL">
+<a class="feedbutton" type="application/atom+xml" href="<TMPL_VAR NAME=ATOMURL>">Atom</a>
+</TMPL_IF>
+</div>
diff --git a/templates/page.tmpl b/templates/page.tmpl
index e1a55be4a..305e7793b 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -9,7 +9,7 @@
<TMPL_IF NAME="FAVICON">
<link rel="icon" href="<TMPL_VAR BASEURL><TMPL_VAR FAVICON>" type="image/x-icon" />
</TMPL_IF>
-<TMPL_IF NAME="RSSLINK"><TMPL_VAR RSSLINK></TMPL_IF>
+<TMPL_IF NAME="FEEDLINKS"><TMPL_VAR FEEDLINKS></TMPL_IF>
<TMPL_IF NAME="META"><TMPL_VAR META></TMPL_IF>
</head>
<body>
diff --git a/templates/rssitem.tmpl b/templates/rssitem.tmpl
index c7e587e1c..bfd38ec31 100644
--- a/templates/rssitem.tmpl
+++ b/templates/rssitem.tmpl
@@ -12,6 +12,6 @@
<category><TMPL_VAR CATEGORY></category>
</TMPL_LOOP>
</TMPL_IF>
- <pubDate><TMPL_VAR PUBDATE></pubDate>
+ <pubDate><TMPL_VAR DATE_822></pubDate>
<description><![CDATA[<TMPL_VAR CONTENT>]]></description>
</item>
diff --git a/templates/rsslink.tmpl b/templates/rsslink.tmpl
deleted file mode 100644
index f70c959d6..000000000
--- a/templates/rsslink.tmpl
+++ /dev/null
@@ -1,5 +0,0 @@
-<div id="rsslink">
-<TMPL_IF NAME="RSSURL">
-<a class="rssbutton" type="application/rss+xml" href="<TMPL_VAR NAME=RSSURL>">RSS</a>
-</TMPL_IF>
-</div>
diff --git a/templates/rsspage.tmpl b/templates/rsspage.tmpl
index 4ec143903..38f9b16b3 100644
--- a/templates/rsspage.tmpl
+++ b/templates/rsspage.tmpl
@@ -1,10 +1,9 @@
<?xml version="1.0"?>
-<rss version="2.0"
- xmlns:dc="http://purl.org/dc/elements/1.1/">
+<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><TMPL_VAR TITLE ESCAPE=HTML></title>
<link><TMPL_VAR PAGEURL></link>
-<description><TMPL_VAR RSSDESC ESCAPE=HTML></description>
+<description><TMPL_VAR FEEDDESC ESCAPE=HTML></description>
<TMPL_VAR CONTENT>
</channel>
</rss>