sbs

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

commit ad31b6afd44c6da670096f7b1e5fead007436777
parent e302daf80f1c2e6f0d9b4342d64d82ed96ae5663
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Mon, 14 Feb 2022 02:46:42 -0500

Add language code insertion and optimize sed invocations

Diffstat:
Msbs | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sbs b/sbs @@ -61,8 +61,9 @@ for file in "$@"; do # Build and process the output document lowdown $buildOptions "$file" \ | cat "templates/header.html" - "templates/footer.html" \ - | sed "s/<title>.*<\/title>/<title>$title - $siteName<\/title>/" \ - | sed "s/content=\"\"/content=\"$meta\"/" \ + | sed -e "s/<title>.*<\/title>/<title>$title - $siteName<\/title>/" \ + -e "s/lang=\"\"/lang=\"$languageCode\"/" \ + -e "s/content=\"\"/content=\"$meta\"/" \ > "static/$subDir/$fileName".html printf "Created: static/$subDir$fileName.html\n"