diff --git a/build.sh b/build.sh index 28e324c..e88edee 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,10 @@ # Because sometimes you just have to rebuild everything rootDir='./_site/' + +index() { + pandoc ./markdown/index.md --css style.css -s -o $rootDir/index.html +} + post() { for file in ./markdown/post/* do @@ -37,4 +42,28 @@ yeet() { neocities push _site/ } + +# Setups site directory from scratch +init() { + mkdir -p "$rootDir/page/" "$rootDir/post/" "$rootDir/fonts/" "$rootDir/img/" + + cp ./img/* "$rootDir/img/" + cp ./fonts/* "$rootDir/fonts/" + + post + page + index + style +} + "$@" + +if [ -z $1 ] +then + echo './build.sh init - create website from scratch' + echo './build.sh post - builds posts' + echo './build.sh page - builds pages' + echo './build.sh style - builds style' + echo './build.sh yeet - upload to neocties' +fi +