diff --git a/make.sh b/make.sh index f2dd89f..e039c70 100755 --- a/make.sh +++ b/make.sh @@ -1,5 +1,4 @@ #!/bin/bash - set -e # global @@ -14,7 +13,10 @@ htmlIndexTmpl=/home/vilmibm/blog/index.tmpl.html htmlIndex=/home/vilmibm/public_html/blog/index.html gopherPath=/home/vilmibm/public_gopher/blog +gopherIndex="${gopherPath}/gophermap" + geminiPath=/home/vilmibm/public_gemini/blog +geminiIndex="${geminiPath}/index.gmi" cd $postDir > /dev/null @@ -30,10 +32,13 @@ cp $htmlIndexTmpl $htmlIndex rm ${gopherPath}/* # Initialize blog gophermap -gopherIndex="${gopherPath}/gophermap" echo "!the phlog of vilmibm as it were" > $gopherIndex echo >> $gopherIndex +# Initialize blog index for gemini +echo "the gemblog of vilmibm as it were" > $geminiIndex +echo >> $geminiIndex + for p in $(ls *.md) do pubdate=$($g "pubdate:" $p | $sed 's/pubdate: //') @@ -58,14 +63,14 @@ do echo "_published ${pubdate}_" >> $gopherPostPath $g -v "pubdate:" $p | $g -v "title:" | $g -v "slug:" >> $gopherPostPath - # TODO index for gemini - # Gemini + echo "=> gemini://tilde.town/~vilmibm/blog/${slug}.gmi ${title}" >> $geminiIndex geminiPostPath="${geminiPath}/${slug}.gmi" echo "# ${title}" > $geminiPostPath echo >> $geminiPostPath echo "_published ${pubdate}_" >> $geminiPostPath $g -v "pubdate:" $p | $g -v "title:" | $g -v "slug:" >> $geminiPostPath fi - echo "" >> $htmlIndex done + +echo "" >> $htmlIndex