From 9f7d532a93feda3ed89c2ca345fa153463718873 Mon Sep 17 00:00:00 2001 From: Stanley Lieber Date: Mon, 9 Dec 2019 22:03:57 -0500 Subject: [PATCH] apps/blagh/atom.tpl: fix rfc3339 dates for feed and entry fields, needed for feed validation. --- apps/blagh/atom.tpl | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl index 1ce511d..f9f78c7 100644 --- a/apps/blagh/atom.tpl +++ b/apps/blagh/atom.tpl @@ -5,16 +5,13 @@ fn statpost { f = $1 - updated = `{date -t `{mtime $f | awk '{print $1}'}} # wtf doesn't this validate? post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' title=`{read $f/index.md} - #stat=`{stat -c '%Y %U' $f} - #mdate=`{/bin/date -Rd `{mtime $f|awk '{print $1}' }} # Not used because it is unreliable by=`{ls -m $f | sed 's/^\[//g; s/].*$//g' >[2]/dev/null} - #ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } } ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } } } -updated = `{ndate -t} +# rfc3339 date when feed was last updated. +fupdated = `{ndate -t `{date `{mtime `{ls $blagh_root$blagh_dirs | grep -e '^'$blagh_root$blagh_dirs'\/[0-9][0-9][0-9][0-9]$' | tail -1} | awk '{print $1}'}}} %} - %($updated%) + %($fupdated%) % for(f in `{get_post_list $blagh_root$blagh_dirs}) { @@ -45,12 +42,13 @@ updated = `{ndate -t} % # +
+ +
- - %($summary%) - - - %($updated%) +% # rfc3339 date when entry was last updated. +% eupdated=`{ndate -t `{date `{mtime $f | awk '{print $1}'}}} + %($eupdated%) % }