2018-12-23 06:26:25 +00:00
|
|
|
# Because sometimes you just have to rebuild everything
|
|
|
|
rootDir='./_site/'
|
|
|
|
post() {
|
|
|
|
for file in ./markdown/post/*
|
|
|
|
do
|
|
|
|
fileName=$(basename $file)
|
|
|
|
pandoc $file --css style.css -s -o $rootDir/post/${fileName%.*}.html
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
page() {
|
|
|
|
for file in ./markdown/pages/*
|
|
|
|
do
|
|
|
|
pandoc $file --css style.css -s -o $rootDir/page/${fileName%.*}.html
|
|
|
|
done
|
|
|
|
}
|
2018-12-23 06:47:01 +00:00
|
|
|
|
|
|
|
style() {
|
|
|
|
# Updating index style
|
|
|
|
cp style.css $rootDir/style.css
|
|
|
|
|
|
|
|
# Updating page style
|
|
|
|
cp style.css $rootDir/page/style.css
|
|
|
|
sed -i 's/(.\/fonts/(..\/fonts/g' $rootDir/page/style.css
|
|
|
|
|
|
|
|
# Updating post style
|
|
|
|
cp style.css $rootDir/post/style.css
|
|
|
|
sed -i 's/(.\/fonts/(..\/fonts/g' $rootDir/post/style.css
|
|
|
|
|
|
|
|
}
|
2018-12-23 08:55:40 +00:00
|
|
|
|
|
|
|
yeet() {
|
|
|
|
post
|
|
|
|
page
|
|
|
|
style
|
|
|
|
# finally we'll upload the site itself to neocities
|
|
|
|
neocities push _site/
|
|
|
|
}
|
|
|
|
|
2018-12-23 06:26:25 +00:00
|
|
|
"$@"
|