sbs

A Simple Blogging System.
git clone https://git.sr.ht/~jbauer/sbs
Log | Files | Refs | README | LICENSE

commit 56aef8bf0d2f74eda514ab2f58b2d231553b98ea
parent 2fc235eaa93ddd3829e4f8d8e1a75dd9be139879
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Wed, 17 Aug 2022 19:48:38 -0400

Fix conversion of gmi links without leading slash

If a link was something like:

=> git.gmi A Page About Git

Then sbs wouldn't convert the link to "git.html" since it was looking
for links that had a leading slash.

Diffstat:
Msbs | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbs b/sbs @@ -158,7 +158,7 @@ build() if [ "$(echo "$file" | awk -F\. '{print $NF}' )" = "gmi" ]; then printf "Converting: %s to markdown...\n" "$file" fileName=$(basename "$file" .gmi) - sed -e 's/\(=> \/\)\(.*\)\(.gmi\)\(.*\)/\1\2.html\4/g' \ + sed -e 's/\(=> \)\(.*\)\(.gmi\)\(.*\)/\1\2.html\4/g' \ -e 's/=> \([^ ]*\) \(.*\)/[\2](\1)\n/g' \ "$file" > /tmp/sbs/"$fileName".md title=$(grep '^# ' "$file" | head -n1 | cut -d' ' -f2-)