maren
17cf04e7f0
previously blog posts were build once when you write a new one rather than each time you build the site (like the other pages) this made it really annoying to change anything about the header and footer layot this commit fixes that
36 lines
966 B
Bash
Executable file
36 lines
966 B
Bash
Executable file
#!/bin/sh -e
|
|
|
|
# prep for build
|
|
rm -rf ./site
|
|
mkdir -p ./site
|
|
mkdir -p ./site/links
|
|
mkdir -p ./site/blog
|
|
mkdir -p ./site/now
|
|
|
|
# build top-level pages
|
|
cat head.html home.html foot.html > ./site/index.html
|
|
cat head.html links.html foot.html > ./site/links/index.html
|
|
cat head.html blog.html foot.html > ./site/blog/index.html
|
|
cat head.html now.html foot.html > ./site/now/index.html
|
|
|
|
|
|
# copy one-offs
|
|
cp style.css ./site/style.css
|
|
cp robots.txt ./site/robots.txt
|
|
cp ./*.jpg favicon.ico ./site/.
|
|
|
|
# build feed
|
|
cp ./feed/feed.atom ./site/feed.atom
|
|
|
|
# build posts
|
|
# cp -a ./posts/. ./site/blog/.
|
|
for dir in ~/code/stillgreenmossdotnet/posts/*/
|
|
do
|
|
fulldir=${dir%*/}
|
|
shortdir=$(basename "$fulldir")
|
|
|
|
mkdir -p ./site/blog/"$shortdir"
|
|
cp "$fulldir"/index.html ./site/blog/"$shortdir"/index.incomplete
|
|
cat head.html ./site/blog/"$shortdir"/index.incomplete foot.html > ./site/blog/"$shortdir"/index.html
|
|
rm ./site/blog/"$shortdir"/index.incomplete
|
|
done
|