setting up for smarter index updating

This commit is contained in:
AlejandroS 2018-06-24 22:26:19 -07:00
parent 7c18e36c92
commit 444e24b7f7
2 changed files with 14 additions and 5 deletions

16
make.sh
View File

@ -6,11 +6,12 @@ post() {
then
# compile the new post and drop it in ./post/
pandoc markdown/post/$1 --css bstyle.css -s -o post/${1%.*}.html
# check to see if we have to rebuild the post or not
# check if we should change index's decription
if [ $2 == "new" ]
then
echo "Rebuilding index.html"
# using md file automatically cat out the header as a title
updateIndex $1
fi
else
# error message incase file was not found
@ -19,7 +20,7 @@ post() {
}
page() {
# check for file as before
# we want to enforce maintainence of directory structure
if [ -f markdown/pages/$1 ]
then
pandoc markdown/pages/$1 --css bstyle.css -s -o page/${1%.*}.html
@ -28,8 +29,15 @@ page() {
fi
}
function updateindex() {
arg1 = $1
arg2 = $2
}
# literally just updates the index file nothing else
index() {
pandoc index.md --css style.css -s -o index.html
pandoc index.md --css style.css -s -o index.html # typing succs
}
help() {

View File

@ -20,4 +20,5 @@ bash make.sh inputFile styleSheet outputFile
# Daily Todo/Order list
1. Finish working on script to so that I can actually get to building some stuff
Layer for index updater which cats out the proper headers/title from a finished markdown post and into the markdown file so that we can compile it like normal