diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc index 8ae26fa..0c11985 100644 --- a/apps/blagh/app.rc +++ b/apps/blagh/app.rc @@ -4,8 +4,13 @@ fn conf_enable_blog { if(~ $#blagh_dirs 0) blagh_dirs=( . ) conf_enable_app blagh + + if(~ $"conf_blog_editors '') + conf_blog_editors=blog-editors + + if(~ $"conf_max_posts_per_page '') + conf_max_posts_per_page=32 } -conf_blog_editors=blog-editors fn blagh_init { if(~ $#blagh_dirs 0 && ~ $req_path */[bB]log/*) { @@ -67,16 +72,18 @@ fn blagh_body { echo '
' + { # XXX Not sure why this fixes issues with blog setup, probably bug in fltr_cache! for(p in `{get_post_list $blagh_root^$blagh_dirs}) { l=`{echo -n $p|sed 's!'$sitedir^'/?(.*)([0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9])(/[^/]+/)!\2 /\1\2\3!'} sed '1s!.*^') ('^$l(1)^')!' < $p/index.md + } } | $formatter } fn get_post_list { # /./->/|/ done to sort -t| and order by date # Note: $paths in blagh_dirs should not contain '/./' or '|' - ls -F $*^/./[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/ >[2]/dev/null | sed -n '/'^$forbidden_uri_chars^'/d; s,/\./,/|/,; /\/$/p' | sort -r '-t|' +1 | sed 's,/+\|/+,/,' + ls -F $*^/./[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/ >[2]/dev/null | sed -n '/'^$forbidden_uri_chars^'/d; s,/\./,/|/,; /\/$/p' | sort -r '-t|' +1 | sed -e 's,/+\|/+,/,' -e $conf_max_posts_per_page^'q' } fn mkbpost { @@ -114,3 +121,7 @@ fn mkbpost { } status=$_status } + +fn strip_title_from_md_file { + sed '1N; /^.*\n===*$/N; /.*\n===*\n$/d' +} diff --git a/apps/blagh/atom.tpl b/apps/blagh/atom.tpl index 49ecbe1..8a5a08b 100644 --- a/apps/blagh/atom.tpl +++ b/apps/blagh/atom.tpl @@ -14,7 +14,7 @@ fn statpost { #mdate=`{/bin/date -Rd `{mtime $f|awk '{print $1}' }} # Not used because it is unreliable by=$stat(2) #ifs=() { summary=`{cat $f/index.md | crop_text 1024 ... | $formatter } } - ifs=() { summary=`{cat $f/index.md | ifs=$difs {$formatter} } } + ifs=() { summary=`{cat $f/index.md | strip_title_from_md_file | ifs=$difs {$formatter} } } } updated = `{/bin/date --rfc-3339'=seconds' |sed 's/ /T/'} %} diff --git a/apps/blagh/rss20.tpl b/apps/blagh/rss20.tpl index 141e891..6a1ed58 100644 --- a/apps/blagh/rss20.tpl +++ b/apps/blagh/rss20.tpl @@ -13,7 +13,7 @@ fn statpost { #mdate=`{/bin/date -Rd $stat(1)} # Not used because it is unreliable post_uri=$base_url^`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}^'/' by=$stat(2) - ifs=() {summary=`{ cat $f/index.md | ifs=$difs {$formatter | escape_html} }} + ifs=() {summary=`{ cat $f/index.md |strip_title_from_md_file| ifs=$difs {$formatter | escape_html} }} } %} diff --git a/apps/bridge/app.rc b/apps/bridge/app.rc index a1b4921..7348e59 100644 --- a/apps/bridge/app.rc +++ b/apps/bridge/app.rc @@ -73,7 +73,7 @@ fn mk_new_comment { if not if(check_user $groups_allowed_comments) u=$logged_user if not - _status='You are not a memeber of a group allowed to comment.' + _status='You are not a member of a group allowed to comment.' if(~ $#_status 0) { umask 002 diff --git a/apps/bridge/foot.tpl b/apps/bridge/foot.tpl index 20e6c1c..84d9b81 100644 --- a/apps/bridge/foot.tpl +++ b/apps/bridge/foot.tpl @@ -19,7 +19,7 @@My proposal has been accepted for RubyConf 2008. Because of the presence of Ruby implementers, this is going to be a bit challenging as it will likely turn into two talks at once. One sharing experiences with fellow developers concerning things they may need to watch out for, and another with language designers about the impact of their changes. It also is likely to be true, as it was at OSCON, that there will be members of the audience who know way more about this subject than I do.
-I had originally requested a slot on Saturday. My current slot requires me to shave a day off of ApacheCon. I’ve again asked that the slot be changed, but even if it doesn’t move, I can manage this. At least we are only talking about a short hop from New Orleans to Orlando.
- -Alf Eaton: Aside: if you’re reading a Planet that contains HubLog, those posts will all jump to the top - sorry! (I wish Planets dealt better with small updates so I didn’t have to worry about it).
-I don’t know what publishing software you use, but I see you provide an Atom feed, and Planet 2.0 and Venus both implement atom:updated as specified in RFC 4287.
- -Alf Eaton: Aside: if you’re reading a Planet that contains HubLog, those posts will all jump to the top - sorry! (I wish Planets dealt better with small updates so I didn’t have to worry about it).
-I don’t know what publishing software you use, but I see you provide an Atom feed, and Planet 2.0 and Venus both implement atom:updated as specified in RFC 4287.
-More specifically, if you have a minor update and leave the updated date alone, the posts will not jump to the top. The next release of WordPress, for example, will contain the necessary hooks for a plugin to provide a simple checkbox for indicating that the change constitutes a minor edit.
- -Now that I have my weblog looking reasonably consistent between Gecko and WebKit based browsers, I’ve taken another look at Opera. Opera doesn’t have support for border-radius, but does have support for background images in SVG, which can be used to provide the same effect. My Nav Bar on my test site now employs this technique, and it requires two separate images: 039 on CCD and CCD on FFF.
-Frankly, my first reaction to this was mixed. The pluses for SVG in CSS is that it doesn’t require either adjusting your markup or JavaScript to achieve these effects, a desirable characteristic that generally the other techniques don’t share.
- -Now that I have my weblog looking reasonably consistent between Gecko and WebKit based browsers, I’ve taken another look at Opera. Opera doesn’t have support for border-radius, but does have support for background images in SVG, which can be used to provide the same effect. My Nav Bar on my test site now employs this technique, and it requires two separate images: 039 on CCD and CCD on FFF.
-Meanwhile, Robert O’Callahan has been exploring other ways to integrate these technologies.
- -