2023-11-22 04:17:13 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
# prep for build
|
|
|
|
rm -rf ./site
|
|
|
|
mkdir -p ./site
|
|
|
|
mkdir -p ./site/links
|
|
|
|
mkdir -p ./site/blog
|
2024-05-09 03:00:47 +00:00
|
|
|
mkdir -p ./site/now
|
2023-11-22 04:17:13 +00:00
|
|
|
|
|
|
|
# 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
|
2024-05-09 03:00:47 +00:00
|
|
|
cat head.html now.html foot.html > ./site/now/index.html
|
|
|
|
|
2023-11-22 04:17:13 +00:00
|
|
|
|
|
|
|
# copy one-offs
|
|
|
|
cp style.css ./site/style.css
|
|
|
|
cp robots.txt ./site/robots.txt
|
2024-05-09 03:00:47 +00:00
|
|
|
cp ./*.jpg favicon.ico ./site/.
|
2023-11-22 04:17:13 +00:00
|
|
|
|
|
|
|
# build feed
|
|
|
|
cp ./feed/feed.atom ./site/feed.atom
|
|
|
|
|
2024-05-11 01:27:31 +00:00
|
|
|
# build posts
|
|
|
|
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
|