feat: update rss so that pubdate roughly corresponds to post publishing date

This commit is contained in:
Nuno Sempere 2022-08-14 22:59:47 +00:00
parent e52d392560
commit a582d4fa50

View File

@ -5,8 +5,11 @@ fn statpost {
f = $1
post_uri = `{echo $f | sed 's,^'$sitedir',,'}
title=`{read $f/index.md}
post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/'
relative_uri=`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}
post_uri=$base_url^$relative_uri^'/'
by=`{ls -m $f | sed 's/^\[//g; s/].*$//g' >[2]/dev/null}
extracted_on=`{echo $relative_uri | sed 's|/blog/||g' | head -c 10 }
published_on=`{ /bin/date -R -D '%Y/%m/%d' -d $extracted_on }
ifs=() {summary=`{ cat $f/index.md |strip_title_from_md_file | head -n 9 | ifs=$difs {$formatter | escape_html} }}
}
@ -38,7 +41,7 @@ fn statpost {
%}
<link>%($post_uri%)</link>
<guid isPermaLink="true">%($post_uri%)</guid>
<pubDate>%($pubdate%)</pubDate>
<pubDate>%( $published_on %)</pubDate>
<description> %($summary%) </description>
</item>
% }