From 444e24b7f7b623b0cf7681197febb983af0b0383 Mon Sep 17 00:00:00 2001 From: AlejandroS Date: Sun, 24 Jun 2018 22:26:19 -0700 Subject: [PATCH] setting up for smarter index updating --- make.sh | 16 ++++++++++++---- notes.md | 3 ++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/make.sh b/make.sh index 33f518f..5603e06 100755 --- a/make.sh +++ b/make.sh @@ -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() { diff --git a/notes.md b/notes.md index 196c4dc..fa79acc 100644 --- a/notes.md +++ b/notes.md @@ -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 +