diff --git a/bin/controller.rc b/bin/controller.rc index 17c5c7a..2aa67f5 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -89,7 +89,6 @@ fn gen_blog_post_title { - # Handlers fn set_handler { handler = $1 @@ -123,19 +122,16 @@ fn dir_listing_handler { fn 404_handler { template `{ get_lib_file 404.tpl } } +fn blog_dir_handler { + blogDirs = $* + tpl_handler lib/feeds/html.tpl +} + fn blog_post_handler { gen_blog_post_title $1 | $formatter $formatter < $1 } -fn debug_handler { - echo '
' - env | escape_html - echo --------------------- - umask - echo '' -} - fn select_handler { @@ -156,8 +152,6 @@ fn select_handler { '^$comment_text } > $ddir/$d.rec } } - if not if (~ $body */_debug) - set_handler debug_handler if not if (test -f $body.tpl) set_handler tpl_handler $body.tpl diff --git a/lib/_debug.tpl b/lib/_debug.tpl new file mode 100644 index 0000000..4d224d9 --- /dev/null +++ b/lib/_debug.tpl @@ -0,0 +1,6 @@ +
+% env | escape_html +--------------------- +% umask ++