2018-06-22 20:19:27 +00:00
|
|
|
post() {
|
|
|
|
# check directory existence
|
|
|
|
if [ -f markdown/post/$1 ]
|
|
|
|
then
|
|
|
|
pandoc markdown/post/$1 --css bstyle.css -s -o post/${1%.*}.html
|
|
|
|
else
|
|
|
|
echo "Check parameters as well: ./make.sh fileType inputFile"
|
|
|
|
fi
|
|
|
|
}
|
2018-06-18 09:16:33 +00:00
|
|
|
|
2018-06-22 20:19:27 +00:00
|
|
|
page() {
|
|
|
|
# check for file as before
|
|
|
|
if [ -f markdown/pages/$1 ]
|
|
|
|
then
|
|
|
|
pandoc markdown/pages/$1 --css bstyle.css -s -o page/${1%.*}.html
|
|
|
|
else
|
|
|
|
echo "File \"$1\" not found in markdown/pages"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
help() {
|
|
|
|
echo "Usage: \./make.sh fileType targetSource"
|
|
|
|
echo "fileType - \[post, page\] - specifices type of html doc to create"
|
|
|
|
echo "targetSource - the file itself that you created in the /markdown directory"
|
|
|
|
}
|
|
|
|
|
|
|
|
"$@"
|