apps/blagh/: fix rss (passes validation), partially fix atom (does not pass validation)

This commit is contained in:
Stanley Lieber 2019-12-07 21:55:44 -05:00
parent c3d7645c7c
commit 4640183908
3 changed files with 9 additions and 16 deletions

View file

@ -7,10 +7,7 @@ fn statpost {
post_uri = `{echo $f | sed 's,^'$sitedir',,'}
#title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
title=`{read $f/index.md}
date=`{date `{mtime $f | awk '{print $1}'}} # rss 2.0 spec says pubDate should conform to rfc822
# TODO: use mtime(1) and ls(1) instead of lunix's stat(1)
#stat=`{stat -c '%Y %U' $f}
#mdate=`{/bin/date -Rd $stat(1)} # Not used because it is unreliable
date=`{ndate -m} # rss 2.0 spec says pubDate should conform to rfc822
post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/'
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 | escape_html} }}
@ -44,7 +41,7 @@ fn statpost {
<link>%($post_uri%)</link>
<guid isPermaLink="true">%($post_uri%)</guid>
<pubDate>%($date%)</pubDate>
<description><![CDATA[%($summary%)]]></description>
<description> %($summary%) </description>
</item>
% }