Add blog header and rss/atom feed links, and fix a bug for agregated blog dirs.
This commit is contained in:
parent
93ad9c35c0
commit
9604018c42
1 changed files with 6 additions and 1 deletions
|
|
@ -54,8 +54,13 @@ fn blagh_setup_feed_handlers {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn blagh_body {
|
fn blagh_body {
|
||||||
|
if (! ~ $"blogTitle '')
|
||||||
|
echo '<h1>'$"blogTitle'</h1>'
|
||||||
|
|
||||||
|
echo '<div style="text-align:right">(<a href="index.rss">RSS Feed</a>|<a href="index.atom">Atom Feed</a>)</div>'
|
||||||
|
|
||||||
for(p in `{get_post_list $blagh_root^$blagh_dirs}) {
|
for(p in `{get_post_list $blagh_root^$blagh_dirs}) {
|
||||||
l=`{echo -n $p|sed 's!'$sitedir^$req_path'./([0-9]+/[0-9][0-9]/[0-9][0-9])(.*)!\1 ./\1\2!'}
|
l=`{echo -n $p|sed 's!'$sitedir^'/?(.*)([0-9]+/[0-9][0-9]/[0-9][0-9])(/[^/]+/)!\2 /\1\2\3!'}
|
||||||
sed '1s!.*^') ('^$l(1)^')!' < $p/index.md
|
sed '1s!.*^') ('^$l(1)^')!' < $p/index.md
|
||||||
} | $formatter
|
} | $formatter
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue