summaryrefslogtreecommitdiff
path: root/publish-blog.sh
diff options
context:
space:
mode:
Diffstat (limited to 'publish-blog.sh')
-rwxr-xr-xpublish-blog.sh5
1 files changed, 3 insertions, 2 deletions
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