M apps/blagh/app.rc +4 -0
@@ 121,3 121,7 @@ fn mkbpost {
}
status=$_status
}
+
+fn strip_title_from_md_file {
+ sed '1N; /^.*\n===*$/N; /.*\n===*\n$/d'
+}
M apps/blagh/atom.tpl +1 -1
@@ 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/'}
%}
M +1 -1
@@ 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} }}
}
%}