apps/blagh/: fix rss (passes validation), partially fix atom (does not pass validation)
This commit is contained in:
parent
c3d7645c7c
commit
4640183908
3 changed files with 9 additions and 16 deletions
|
|
@ -74,15 +74,14 @@ fn blagh_body {
|
|||
# An user can add this on their own using handlers_body_head anyway.
|
||||
#echo '<div style="text-align:right">(<a href="index.rss">RSS Feed</a>|<a href="index.atom">Atom Feed</a>)</div>'
|
||||
|
||||
{ # XXX Not sure why this fixes issues with blog setup, probably bug in fltr_cache!
|
||||
# XXX Not sure why this fixes issues with blog setup, probably bug in fltr_cache!
|
||||
for(p in `{get_post_list $blagh_root^$blagh_dirs}) {
|
||||
l=`{echo -n $p|sed 's!'$sitedir^'/?(.*)([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9])(/[^/]+/)!\2 /\1\2\3!'}
|
||||
sed '1s!.*^') ('^$l(1)^')!' < $p/index.md
|
||||
echo # Needed extra \n so markdown doesn't mess up the formatting, probably can be done in sed.
|
||||
}
|
||||
} | $formatter
|
||||
# XXX BUG! Markdown [references] break because multiple markdown documents are merged. Should format each blog post independently.
|
||||
# TODO: use fltr_cache directly, that can fix the previous bug plus provide a perf boost by caching title generation.
|
||||
} | $formatter
|
||||
}
|
||||
|
||||
fn get_post_list {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue