diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc index c63689d..b6f3a07 100644 --- a/apps/blagh/app.rc +++ b/apps/blagh/app.rc @@ -83,7 +83,8 @@ fn blagh_body { 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(2)^') ('^$l(1)^')!' < $p/index.md echo # Needed extra \n so markdown doesn't mess up the formatting, probably can be done in sed. - } | $formatter + } head -n 9 | $formatter | sed 's/h[2-9]/i/g'| sed 's/h1/h3/g' + # ^ take the first 9 lines of markdown, convert them to html. Then make h1->h3 and h_i -> cursive. This makes it more like a preview rather than all the posts pasted together. # 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. }