commit 46310ea045e5d979c8cbbf343c9bf94ed95da8d8 parent 3b82679cf557d2c0e7777f2dbe0a8ece7abf82bb Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Sun, 22 May 2022 22:35:26 +0200 Better blog page for gemini Diffstat:
M | build.sh | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/build.sh b/build.sh @@ -70,5 +70,21 @@ makeblog() { echo "</rss>" >> $ff } +gemblog() { + bg=gemini/blog/index.gmi + + printf "# Blog\n\n=> feed.xml RSS Feed\n\n" > $bg + for i in $(ls src/blog); do + if [ -d src/blog/$i ]; then + d=$(echo $i | grep -oE '^[0-9]{4}-[0-9]{2}-[0-9]{2}') + t=$(head -n 1 $f | sed 's/# //') + echo "=> $i $d $t" >> $bg + fi + done + echo "" >> $bg + cat bottom.gmi >> $bg +} + makeblog recursivebuild src +gemblog