ref: 095f3bf1240f9bb815ebde74fe8246c8615dbcea
parent: 5d2969a3a2fb2431a28e13289352454ba80f9091
author: Uriel <u@berlinblue.org>
date: Mon Jun 21 19:41:18 EDT 2010
When showing a _header.md file for a dir listing, try to extract the page title from it.
--- a/bin/corehandlers.rc
+++ b/bin/corehandlers.rc
@@ -121,8 +121,13 @@
# Dir listing
if not if(~ $local_path */index) {handler_body_main=(dir_listing_handler $req_path)
- if(test -f $sitedir$req_path'_header.md')
- ll_add handlers_body_head md_handler $sitedir$req_path'_header.md'
+ if(test -f $sitedir$req_path'_header.md') {+ t=`{get_file_title $sitedir$req_path'_header.md'}+ if(! ~ $"t '')
+ pageTitle=$t
+
+ ll_add handlers_body_head md_handler $sitedir$req_path'_header.md'
+ }
if(test -f $sitedir$req_path'_footer.md')
ll_add handlers_body_foot md_handler $sitedir$req_path'_footer.md'
}
--
⑨