easier to read and removed some pointless branches
This commit is contained in:
parent
1643a6f8f3
commit
c3341a6cb3
23
make.sh
23
make.sh
@ -1,15 +1,11 @@
|
|||||||
# compiles new post into target directory
|
# compiles new post into target directory
|
||||||
rootDir='./_site/'
|
rootDir='./_site/'
|
||||||
|
|
||||||
|
mPageDir='./markdown/page/'
|
||||||
|
mPostDir='./markdown/post/'
|
||||||
|
|
||||||
post() {
|
post() {
|
||||||
# check directory existence
|
pandoc $mPostDir/$1 --css style.css -s -o $rootDir/post/${1%.*}.html
|
||||||
if [ -f markdown/post/$1 ]
|
|
||||||
then
|
|
||||||
# CSS file is always relative to the target html location
|
|
||||||
pandoc markdown/post/$1 --css style.css -s -o $rootDir/post/${1%.*}.html
|
|
||||||
else
|
|
||||||
# error message incase file was not found
|
|
||||||
echo "File \"$1\" not found in markdown/post"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
style() {
|
style() {
|
||||||
@ -26,13 +22,8 @@ style() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
page() {
|
page() {
|
||||||
# we want to enforce maintainence of directory structure
|
pandoc $mPageDir/$1 --css style.css -s -o $rootDir/page/${1%.*}.html
|
||||||
if [ -f markdown/pages/$1 ]
|
|
||||||
then
|
|
||||||
pandoc markdown/pages/$1 --css style.css -s -o $rootDir/page/${1%.*}.html
|
|
||||||
else
|
|
||||||
echo "File \"$1\" not found in markdown/pages"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# literally just updates the index file nothing else
|
# literally just updates the index file nothing else
|
||||||
|
Loading…
Reference in New Issue
Block a user