URI: 
       tsupport markdown titles; fast clean - mars - superminimal static website framework
  HTML git clone git://parazyd.org/mars.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit c85d220ed80b3b35c5f64af98cfbc56c038e06aa
   DIR parent 654c586bc7eaad78a17fbef50a5f40ca3f569a58
  HTML Author: parazyd <parazyd@dyne.org>
       Date:   Fri,  1 Jul 2016 19:05:02 +0200
       
       support markdown titles; fast clean
       
       Diffstat:
         M mars.sh                             |       9 +++++----
       
       1 file changed, 5 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/mars.sh b/mars.sh
       t@@ -62,7 +62,7 @@ generate() {
        }
        
        clean() {
       -        countdown "cleaning" && \
       +        [[ "$1" == "-f" ]] || { countdown "cleaning" }
                for dir in $tree; do
                        print "${fg[blue]}        -- /$dir --${reset_color}"
                        pushd $dir && pages=($(ls *.$pageformat)) && {
       t@@ -90,10 +90,10 @@ process-page() {
                                                cat $i >> $name.html
                                        done }
        
       -                        local pagetitle=`grep '^##+ ' $page | cut -c 5- -`
       +                        local pagetitle=`grep '^##+TITLE ' $page | cut -c 10- -`
                                sed -i -e 's/DEFAULT_TITLE/'$pagetitle'/' $name.html
                                tmpage=`mktemp` && cp $page $tmpage
       -                        sed -i -e 's/##+ .*//' $tmpage
       +                        sed -i -e 's/##+TITLE .*//' $tmpage
        
                                python -m markdown $tmpage >> $name.html \
                                        && print "$(msgokay) $name.$pageformat                ->        $name.html" \
       t@@ -120,6 +120,7 @@ skip-page() {
        push() {
                countdown "rsyncing" && \
                rsync -P -e 'ssh' -avul --delete --stats \
       +                #-n \
                        --size-only \
                        --exclude-from 'rsync-exclude' \
                        . $WEBHOST:$WEBROOT
       t@@ -127,7 +128,7 @@ push() {
        
        case "$1" in
                generate) generate;;
       -        clean) clean;;
       +        clean) clean "$2";;
                push) push;;
                *) print "usage: `basename $0` {generate|clean|push}";;
        esac