From 522a9e55821d46e084be43c15e5819594bbee220 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Mon, 26 Jun 2023 19:49:02 -0400 Subject: Move entries to pages and rearrange files Some minor spellchecking also involved here. But basically the intention is to do: pages/ More permanent pages entries/ These are just the articles themselves templates/ These are page snippets to include around The intention for splitting out entries is for if I host this also on gemini the entries are what I can do the processing against vs the page itself which contains the boilerplate template --- render.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'render.sh') diff --git a/render.sh b/render.sh index 47cd89d..2ae2309 100755 --- a/render.sh +++ b/render.sh @@ -1,4 +1,13 @@ set -ex; + +function injectTemplate { + tmpl=$1 + dest=$2 + key=$(basename ${tmpl} .html) + sed -i "/[{]${key}[}]/r ${tmpl}" $dest + sed -i "s/[{]${key}[}]//g" $dest +} + if [ $# -ne 2 ]; then echo "Usage: ./render.sh www///.html" exit 1; @@ -11,9 +20,11 @@ mkdir -p $(dirname $DEST) cp $FILE $DEST for tmpl in templates/*.html; do - key=$(basename ${tmpl} .html) - sed -i "/[{]${key}[}]/r ${tmpl}" $DEST - sed -i "s/[{]${key}[}]//g" $DEST + injectTemplate $tmpl $DEST +done +for tmpl in entries/*.html; do + injectTemplate $tmpl $DEST done + ./tidy.sh $DEST -- cgit v1.2.3-54-g00ecf