When showing a _header.md file for a dir listing, try to extract the page title from it.
This commit is contained in:
parent
5d2969a3a2
commit
095f3bf124
1 changed files with 7 additions and 2 deletions
|
|
@ -121,8 +121,13 @@ fn setup_handlers {
|
||||||
# Dir listing
|
# Dir listing
|
||||||
if not if(~ $local_path */index) {
|
if not if(~ $local_path */index) {
|
||||||
handler_body_main=(dir_listing_handler $req_path)
|
handler_body_main=(dir_listing_handler $req_path)
|
||||||
if(test -f $sitedir$req_path'_header.md')
|
if(test -f $sitedir$req_path'_header.md') {
|
||||||
ll_add handlers_body_head md_handler $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')
|
if(test -f $sitedir$req_path'_footer.md')
|
||||||
ll_add handlers_body_foot md_handler $sitedir$req_path'_footer.md'
|
ll_add handlers_body_foot md_handler $sitedir$req_path'_footer.md'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue