From 5421fe09cc64c2ceae18e074251a5c22be874101 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 4 Nov 2022 15:28:06 -0400 Subject: Update wishlist from .md source --- compile-md.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'compile-md.sh') diff --git a/compile-md.sh b/compile-md.sh index f79f742..7b982c0 100755 --- a/compile-md.sh +++ b/compile-md.sh @@ -2,18 +2,20 @@ set -ex -if [ $# -ne 3 ]; then - echo "./compile-md.sh [page|blog] [in.md] [out.html]" +if [ $# -ne 4 ]; then + echo "./compile-md.sh [page|blog] [title] [in.md] [out.html]" exit 1 fi -in=$2 -out=$3 +ptype=$1 +title=$2 +in=$3 +out=$4 -if [ $1 == "blog" ]; then +if [ $ptype == "blog" ]; then cat templates/blog-header.html > $out else - if [ $1 == "page" ]; then + if [ $ptype == "page" ]; then cat templates/page-header.html > $out else echo "Missing first parameter: [page|blog]" @@ -21,6 +23,10 @@ else fi fi +pclass=$(echo "$title" | tr [:upper:] [:lower:]) +sed -ie "s/PAGE_TITLE/$title/" $out # replace title +sed -ie "s/PAGE_CLASS/$pclass/" $out # replace class + markdown $in >> $out if [ $1 == "blog" ]; then -- cgit v1.2.3-54-g00ecf From c3e42f7851ce66af164621c7555021f1061bc286 Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 4 Nov 2022 16:18:13 -0400 Subject: Update wishlist and fix compile script --- compile-md.sh | 4 ++-- www/wishlist.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'compile-md.sh') diff --git a/compile-md.sh b/compile-md.sh index 7b982c0..c02e692 100755 --- a/compile-md.sh +++ b/compile-md.sh @@ -24,8 +24,8 @@ else fi pclass=$(echo "$title" | tr [:upper:] [:lower:]) -sed -ie "s/PAGE_TITLE/$title/" $out # replace title -sed -ie "s/PAGE_CLASS/$pclass/" $out # replace class +sed -i "s/PAGE_TITLE/$title/" $out # replace title +sed -i "s/PAGE_CLASS/$pclass/" $out # replace class markdown $in >> $out diff --git a/www/wishlist.html b/www/wishlist.html index 200ef5f..0541046 100644 --- a/www/wishlist.html +++ b/www/wishlist.html @@ -3,7 +3,7 @@ - senders.io - wishlist + senders.io - Wishlist @@ -106,7 +106,7 @@ Discogs - 💖 + KANGA -- cgit v1.2.3-54-g00ecf