diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc old mode 100644 new mode 100755 index b6f3a07..330a217 --- a/apps/blagh/app.rc +++ b/apps/blagh/app.rc @@ -9,7 +9,7 @@ fn conf_enable_blog { conf_blog_editors=blog-editors if(~ $"conf_max_posts_per_page '') - conf_max_posts_per_page=32 + conf_max_posts_per_page=16 } fn blagh_init { @@ -72,20 +72,28 @@ fn blagh_setup_feed_handlers { fn blagh_body { if (! ~ $"blogTitle '') - echo '

'$"blogTitle'

' + echo '

'$"blogTitle'

' # Direct links to feeds are disabled because they are not very useful, add clutter and might waste pagerank. # An user can add this on their own using handlers_body_head anyway. - #echo '
(RSS Feed|Atom Feed)
' + echo '
RSS Feed
' + # |Atom Feed' + # Markdown posts # 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)^') ('^$l(1)^')!' < $p/index.md + # cat $p/index.md | sed '1s!.*![&]('^$l(2)^') ('^$l(1)^')!' | sed -n '/^.\{15\}/p' | echo echo # Needed extra \n so markdown doesn't mess up the formatting, probably can be done in sed. - } 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. + echo # + } | head -n 9 | $formatter | sed 's/h[2-9]/i/g'| sed 's/h1/h3/g' + # HTML posts + for(p in `{get_post_list $blagh_root^$blagh_dirs}) { + cat < $p/index.html + echo # Needed extra \n so markdown doesn't mess up the formatting, probably can be done in sed. + } | sed 's/h[2-9]/i/g' | sed 's/h1/h3/g' | head -n 5 + # 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. } diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl old mode 100644 new mode 100755 diff --git a/apps/blagh/jsonfeed.tpl b/apps/blagh/jsonfeed.tpl old mode 100644 new mode 100755 diff --git a/apps/blagh/new_post.tpl b/apps/blagh/new_post.tpl old mode 100644 new mode 100755 diff --git a/apps/blagh/rss20.tpl b/apps/blagh/rss20.tpl old mode 100644 new mode 100755 diff --git a/apps/duckduckgo/HOWTO b/apps/duckduckgo/HOWTO old mode 100644 new mode 100755 diff --git a/apps/duckduckgo/footer.inc.sample b/apps/duckduckgo/footer.inc.sample old mode 100644 new mode 100755