ref: f127e707377690669fad0f81a46e74d68f990246
parent: 5b1843bcd6a750092182464f5739a053811efb29
author: uriel <uriel@suckless.org>
date: Tue Sep 30 06:41:10 EDT 2008
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.
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -107,7 +107,12 @@
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 @@
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