From 2930632c5e0a53eeda24aaaf66bc3c2aab758dba Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 22 May 2022 12:13:41 +0200 Subject: Added build for gemini; changed logo to img --- build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 4e117b3..8ccb2c8 100755 --- a/build.sh +++ b/build.sh @@ -2,10 +2,13 @@ recursivebuild() { local destdir=$(echo $1 | sed 's|^src|http|') + local destdir_gmi=$(echo $1 | sed 's|^src|gemini|') mkdir -p "$destdir" + mkdir -p "$destdir_gmi" for file in $(ls $1); do if [ -d "$1/$file" ]; then mkdir -p "$destdir/$file" + mkdir -p "$destdir_gmi/$file" recursivebuild "$1/$file" else extension=$(echo "$file" | sed 's/.*\.//') @@ -15,6 +18,11 @@ recursivebuild() { > "$destdir/index.html" lowdown "$1/$file" >> "$destdir/index.html" cat bottom.html >> "$destdir/index.html" + + lowdown -Tgemini --gemini-link-roman \ + --gemini-link-end \ + "$1/$file" > "$destdir_gmi/index.gmi" + cat bottom.gmi >> "$destdir_gmi/index.gmi" elif [ "$extension" = "html" ]; then cat top.html "$1/$file" bottom.html \ | sed "s/TITLE/$(grep '$//')/" \ > "$destdir/index.html" + elif [ "$extension" = "gmi" ]; then + cat "$1/$file" bottom.gmi > \ + "$destdir_gmi/index.gmi" else cp "$1/$file" "$destdir/$file" + cp "$1/$file" "$destdir_gmi/$file" fi fi done -- cgit v1.3