feat: update rss so that pubdate roughly corresponds to post publishing date
This commit is contained in:
parent
e52d392560
commit
a582d4fa50
|
@ -5,8 +5,11 @@ fn statpost {
|
||||||
f = $1
|
f = $1
|
||||||
post_uri = `{echo $f | sed 's,^'$sitedir',,'}
|
post_uri = `{echo $f | sed 's,^'$sitedir',,'}
|
||||||
title=`{read $f/index.md}
|
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}
|
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} }}
|
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>
|
<link>%($post_uri%)</link>
|
||||||
<guid isPermaLink="true">%($post_uri%)</guid>
|
<guid isPermaLink="true">%($post_uri%)</guid>
|
||||||
<pubDate>%($pubdate%)</pubDate>
|
<pubDate>%( $published_on %)</pubDate>
|
||||||
<description> %($summary%) </description>
|
<description> %($summary%) </description>
|
||||||
</item>
|
</item>
|
||||||
% }
|
% }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user