setting up for smarter index updating
This commit is contained in:
parent
7c18e36c92
commit
444e24b7f7
16
make.sh
16
make.sh
@ -6,11 +6,12 @@ post() {
|
|||||||
then
|
then
|
||||||
# compile the new post and drop it in ./post/
|
# compile the new post and drop it in ./post/
|
||||||
pandoc markdown/post/$1 --css bstyle.css -s -o post/${1%.*}.html
|
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" ]
|
if [ $2 == "new" ]
|
||||||
then
|
then
|
||||||
echo "Rebuilding index.html"
|
echo "Rebuilding index.html"
|
||||||
|
# using md file automatically cat out the header as a title
|
||||||
|
updateIndex $1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# error message incase file was not found
|
# error message incase file was not found
|
||||||
@ -19,7 +20,7 @@ post() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
page() {
|
page() {
|
||||||
# check for file as before
|
# we want to enforce maintainence of directory structure
|
||||||
if [ -f markdown/pages/$1 ]
|
if [ -f markdown/pages/$1 ]
|
||||||
then
|
then
|
||||||
pandoc markdown/pages/$1 --css bstyle.css -s -o page/${1%.*}.html
|
pandoc markdown/pages/$1 --css bstyle.css -s -o page/${1%.*}.html
|
||||||
@ -28,8 +29,15 @@ page() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function updateindex() {
|
||||||
|
arg1 = $1
|
||||||
|
arg2 = $2
|
||||||
|
}
|
||||||
|
|
||||||
|
# literally just updates the index file nothing else
|
||||||
index() {
|
index() {
|
||||||
pandoc index.md --css style.css -s -o index.html
|
pandoc index.md --css style.css -s -o index.html # typing succs
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
|
3
notes.md
3
notes.md
@ -20,4 +20,5 @@ bash make.sh inputFile styleSheet outputFile
|
|||||||
|
|
||||||
# Daily Todo/Order list
|
# 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user