From 39318169e0b50551db511851829f9337c5fa6313 Mon Sep 17 00:00:00 2001 From: glenda Date: Sun, 15 Nov 2020 15:13:27 +0000 Subject: Import site to git --- apps/blagh/atom.tpl | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 apps/blagh/atom.tpl (limited to 'apps/blagh/atom.tpl') diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl new file mode 100644 index 0000000..97c665f --- /dev/null +++ b/apps/blagh/atom.tpl @@ -0,0 +1,58 @@ + + +%{ +# See for more info:http://www.tbray.org/ongoing/When/200x/2005/07/27/Atomic-RSS +fn statpost { + f = $1 + + post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' + title=`{read $f/index.md} + by=`{ls -m $f | sed 's/^\[//g; s/].*$//g' >[2]/dev/null} + ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } } +} +# rfc3339 date when feed was last updated. +fupdated = `{ndate -a `{date `{mtime `{ls $blagh_root$blagh_dirs/[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/[0-9] | tail -1} | awk '{print $1}'}}} +%} + + + +% if(! ~ $"conf_blog_pubsubdub_hub '') { +% echo '' +% } + + + %($base_url^$req_path%) + + + <![CDATA[%($siteTitle%)]]> + + + %($fupdated%) + + +% for(f in `{get_post_list $blagh_root$blagh_dirs}) { +% statpost $f + + +% # Maybe we should be smarter, see: http://diveintomark.org/archives/2004/05/28/howto-atom-id, example: tag:intertwingly.net,2004:2899 + %($post_uri%) + + <![CDATA[%($title%)]]> +% # + + +
+ +
+ +% # rfc3339 date when entry was last updated. +% eupdated=`{ndate -a `{date `{mtime $f | awk '{print $1}'}}} + %($eupdated%) +
+ +% } + +
+ +% exit -- cgit v1.2.3