cleaned up makefile a bit
This commit is contained in:
parent
a04e7a7af7
commit
d12e075db7
7
make.sh
7
make.sh
@ -1,5 +1,4 @@
|
|||||||
# not only updates the post but inserts the description found in desc.md into the index.md then recompiles
|
# builds a sick post
|
||||||
# only gets called if
|
|
||||||
post() {
|
post() {
|
||||||
# check directory existence
|
# check directory existence
|
||||||
if [ -f markdown/post/$1 ]
|
if [ -f markdown/post/$1 ]
|
||||||
@ -7,22 +6,22 @@ post() {
|
|||||||
# 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
|
||||||
else
|
else
|
||||||
# error message incase file was not found
|
|
||||||
echo "File \"$1\" not found in markdown/post"
|
echo "File \"$1\" not found in markdown/post"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# builds a site "page" like the about page, links page etc
|
||||||
page() {
|
page() {
|
||||||
# we want to enforce maintainence of directory structure
|
# we want to enforce maintainence of directory structure
|
||||||
if [ -f markdown/pages/$1 ]
|
if [ -f markdown/pages/$1 ]
|
||||||
then
|
then
|
||||||
|
# compile then drop in ./page/
|
||||||
pandoc markdown/pages/$1 --css bstyle.css -s -o page/${1%.*}.html
|
pandoc markdown/pages/$1 --css bstyle.css -s -o page/${1%.*}.html
|
||||||
else
|
else
|
||||||
echo "File \"$1\" not found in markdown/pages"
|
echo "File \"$1\" not found in markdown/pages"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# literally just updates the index file nothing else
|
|
||||||
index() {
|
index() {
|
||||||
pandoc index.md --css style.css -s -o index.html # typing succs
|
pandoc index.md --css style.css -s -o index.html # typing succs
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user