# compiles new post into target directory rootDir='./_site/' mdRoot='./markdown/' mPostDir='./markdown/post/' # Right now: # no images # root pages # post pages post() { pandoc $mPostDir/$1 --css style.css -s -o $rootDir/post/${1%.*}.html # TODO: do acheck for images and build if there are any images } style() { [[ -z $1 ]] && echo 'No target given' && exit 0 # Updating index style cp style.css $rootDir/style.css # Updating page style cp style.css $rootDir/page/style.css # Updating post style cp style.css $rootDir/post/style.css } root() { if [[ -z $2 ]] then pandoc $mdRootr/$1 --css style.css -s -o $rootDir/page/${1%.*}.html exit 0 fi pandoc $mdRootr/$1 --css $2 -s -o $rootDir/${1%.*}.html } # taking function names as param "$@" if [ -z $1 ] then echo './make.sh post file.md - make new post' echo './make.sh style - update & sync style sheets' echo './make.sh page file.md - make new page' echo './make.sh index - update index' fi