adding init function to build script
This commit is contained in:
parent
bcbe145ab4
commit
e278dc14c0
29
build.sh
29
build.sh
@ -1,5 +1,10 @@
|
|||||||
# Because sometimes you just have to rebuild everything
|
# Because sometimes you just have to rebuild everything
|
||||||
rootDir='./_site/'
|
rootDir='./_site/'
|
||||||
|
|
||||||
|
index() {
|
||||||
|
pandoc ./markdown/index.md --css style.css -s -o $rootDir/index.html
|
||||||
|
}
|
||||||
|
|
||||||
post() {
|
post() {
|
||||||
for file in ./markdown/post/*
|
for file in ./markdown/post/*
|
||||||
do
|
do
|
||||||
@ -37,4 +42,28 @@ yeet() {
|
|||||||
neocities push _site/
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user