summaryrefslogtreecommitdiff
path: root/apps/blagh/app.rc
diff options
context:
space:
mode:
authorGravatar Jeremiah Dow <jeremdow@gmail.com> 2011-03-31 23:27:34 -0400
committerGravatar Jeremiah Dow <jeremdow@gmail.com> 2011-03-31 23:27:34 -0400
commitd710aff0b2322974884ce018cab38d9709ecfc90 (patch)
tree7413b8c51da4e85c274ad7d19b38bd60199464f6 /apps/blagh/app.rc
parent9485c7eeb1fd0c05f46eb13767086d1e9fa73e92 (diff)
downloadjeremdow.us-d710aff0b2322974884ce018cab38d9709ecfc90.tar.gz
format blog posts individually, dates in <span>, posts in <article> tags
Diffstat (limited to 'apps/blagh/app.rc')
-rw-r--r--apps/blagh/app.rc8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc
index bc4149d..f181954 100644
--- a/apps/blagh/app.rc
+++ b/apps/blagh/app.rc
@@ -74,15 +74,13 @@ 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!
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(2)^') <span class="date">'^$l(1)^'</span>!' < $p/index.md
- echo # Needed extra \n so markdown doesn't mess up the formatting, probably can be done in sed.
+ echo '<article>'
+ sed '1s!.*![&]('^$l(2)^') <span class="date">'^$l(1)^'</span>!' < $p/index.md | $formatter
+ echo '</article>'
}
- # 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 {