commit 344c8afadf62d627513920ad2aa176d3c2060abb
parent d3e9bf554e7a843e042de878cb0bbe6fa4d6ac8d
Author: uriel@suckless.org <unknown>
Date: Tue, 30 Sep 2008 10:41:10 +0200
Allo to override the blog post author by setting the conf blogAuthor and use file owner as a fallback only for blogs that are not 'agregators'.
Remove some blog info related dead code.
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bin/controller.rc b/bin/controller.rc
@@ -107,7 +107,12 @@ fn gen_blog_post_title {
title=`{basename $1 | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
permlink= `{echo $1 | sed 's,^/[a-z/]*www/,/,; s,^sites/[^/]*/*/,/,; s/\.md$//' }
du=`{ls -l $1}
- echo '##<a href="'^$"permlink^'">' $"title^'</a> *('By $du(4) Last mod: $du(7 8 9) ')*'
+ by = ''
+ if (! ~ $#blogAuthor 0)
+ by='By '$"blogAuthor
+ if not if (~ $#blogDirs 1)
+ by='By '$du(4)
+ echo '##<a href="'^$"permlink^'">' $"title^'</a> *( '$by Last mod: $du(7 8 9) ' )*'
}
@@ -155,9 +160,6 @@ fn blog_dir_handler {
echo '<div style="text-align:right">(<a href="index.rss">rss feed</a>)</div>'
for (f in `{ sortedBlogPostList $blogDirs }) {
- #title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
- #du=`{ls -l $f}
- #echo '##' $title '*('By $du(4) Last mod: $du(7 8 9) ')*'
gen_blog_post_title $f
cat $f
echo