From b5b85066bc8bfa6db6eaa33e3f14c0eaafafe5af Mon Sep 17 00:00:00 2001 From: Bill Date: Sat, 31 Dec 2022 21:14:51 -0500 Subject: RSS Blog and Generate RSS Feed! --- publish-blog.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'publish-blog.sh') diff --git a/publish-blog.sh b/publish-blog.sh index c5a483f..33190b6 100755 --- a/publish-blog.sh +++ b/publish-blog.sh @@ -25,10 +25,10 @@ fi # Get Page Title -title=$(head -n1 $in | sed -E 's/^##[[:space:]]*(.+)[[:space:]]*$/\1/g') +title=$(head -n1 $in | sed -E 's/^[#]{1,2}[[:space:]]*(.+)[[:space:]]*$/\1/g') # File info -path=www/blog/${isodate} +path=./www/blog/${isodate} out=${path}/index.html # Make path @@ -57,6 +57,7 @@ if [ $exists -eq 1 ]; then line="1. [${isodate} - ${title}](/blog/${isodate}/)" sed -E -i "/$marker/a $line" $index ./compile-md.sh page "Blog Index" $index www/blog/index.html + ./update-feed.sh ${isodate} "${title}" $out else echo "Already exists in index - not updating" fi -- cgit v1.2.3-54-g00ecf