Update minor bug in syncing files

Didn't catch this when testing all the pages (saw that setup and index
worked but not others).

Removes '.md' from the permalink.
This commit is contained in:
Charlie Drage 2017-03-23 12:47:13 -04:00
parent e888ed4618
commit 5df9f210bf

View File

@ -37,10 +37,12 @@ for filename in *.md; do
then then
echo "$filename already contains Jekyll format" echo "$filename already contains Jekyll format"
else else
# Remove ".md" from the name
name=${filename::-3}
echo "Adding Jekyll file format to $filename" echo "Adding Jekyll file format to $filename"
jekyll="--- jekyll="---
layout: default layout: default
permalink: /$filename/ permalink: /$name/
--- ---
" "
echo -e "$jekyll\n$(cat $filename)" > $filename echo -e "$jekyll\n$(cat $filename)" > $filename