fix blog post workflow

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
This commit is contained in:
maren 2024-05-10 21:27:31 -04:00
parent 2396610121
commit 17cf04e7f0
7 changed files with 19 additions and 175 deletions

View file

@ -22,4 +22,15 @@ cp ./*.jpg favicon.ico ./site/.
# build feed
cp ./feed/feed.atom ./site/feed.atom
cp -a ./posts/. ./site/blog/.
# 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

View file

@ -3,8 +3,10 @@
mkdir -p ./posts
# get name and url and other values we need
read -p "Title of blog post: " postTitle
read -p "URL string for blog post: " postUrl
printf "Title of blog post: "
read -r postTitle
printf "URL string for blog post: "
read -r postUrl
fullUrl='https:\/\/stillgreenmoss\.net\/blog\/'"$postUrl"
currentMonth=$(date +%B)
currentYear=$(date +%Y)
@ -20,9 +22,8 @@ mkdir -p ./posts/"$postUrl"
# prompt user for html for the post
"${EDITOR:-vi}" ./posts/"$postUrl"/post.html
# make the post a page
cat head.html ./posts/"$postUrl"/post.html foot.html > ./posts/"$postUrl"/index.html
rm ./posts/"$postUrl"/post.html
# put post in the place it lives
mv ./posts/"$postUrl"/post.html ./posts/"$postUrl"/index.html
### update atom feed

View file

@ -1,29 +1,3 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/style.css">
<link href="/favicon.ico" type="image/x-icon" rel="icon"><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon">
<title>still, green moss</title>
</head>
<body>
<div class="head">
<h1>thiss <a href="https://en.wikipedia.org/wiki/Moss">moss</a> iss <a href="https://en.wikipedia.org/wiki/Silence">still</a> <a href="https://en.wikipedia.org/wiki/Green">greenn</a></h1>
<p><a href="/">home</a> | <a href="/blog">blog</a> | <a href="/links">links</a> | <a href="/now">now</a> | <a href="/feed.atom">feed</a></p>
<div class="row">
<div class="column">
<img src="/venus.jpg" alt="venus flytraps and moss" style="width:100%">
</div>
<div class="column">
<img src="/forest.jpg" alt="a coastal pine savannah forest" style="width:100%">
</div>
<div class="column">
<img src="/pitcher.jpg" alt="a cluster of pitcher plants" style="width:100%">
</div>
</div>
</div>
<h2>diy sms ftw vs ig, fb, etc.</h2>
<p><em>november 17th 2023</em></p>
@ -49,11 +23,3 @@
<p>if you know of something like this that already exists, please send me an email!</p>
<p>i'm really excited and i hope it works out :)</p>
<div class="foot">
<p>see ya later</p>
<p><a href="https://creativecommons.org/publicdomain/zero/1.0/">cc0</a></p>
</div>
</body>
</html>

View file

@ -1,29 +1,3 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/style.css">
<link href="/favicon.ico" type="image/x-icon" rel="icon"><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon">
<title>still, green moss</title>
</head>
<body>
<div class="head">
<h1>thiss <a href="https://en.wikipedia.org/wiki/Moss">moss</a> iss <a href="https://en.wikipedia.org/wiki/Silence">still</a> <a href="https://en.wikipedia.org/wiki/Green">greenn</a></h1>
<p><a href="/">home</a> | <a href="/blog">blog</a> | <a href="/links">links</a> | <a href="/now">now</a> | <a href="/feed.atom">feed</a></p>
<div class="row">
<div class="column">
<img src="/venus.jpg" alt="venus flytraps and moss" style="width:100%">
</div>
<div class="column">
<img src="/forest.jpg" alt="a coastal pine savannah forest" style="width:100%">
</div>
<div class="column">
<img src="/pitcher.jpg" alt="a cluster of pitcher plants" style="width:100%">
</div>
</div>
</div>
<h2>i'm thinking about something but i don't know what yet</h2>
<p><em>december 15th, 2023</em></p>
@ -55,11 +29,3 @@
<hr>
<p>i came back, and actually i think this post is done</p>
<div class="foot">
<p>see ya later</p>
<p><a href="https://creativecommons.org/publicdomain/zero/1.0/">cc0</a></p>
</div>
</body>
</html>

View file

@ -1,30 +1,5 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/style.css">
<link href="/favicon.ico" type="image/x-icon" rel="icon"><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon">
<title>still, green moss</title>
</head>
<body>
<div class="head">
<h1>thiss <a href="https://en.wikipedia.org/wiki/Moss">moss</a> iss <a href="https://en.wikipedia.org/wiki/Silence">still</a> <a href="https://en.wikipedia.org/wiki/Green">greenn</a></h1>
<p><a href="/">home</a> | <a href="/blog">blog</a> | <a href="/links">links</a> | <a href="/now">now</a> | <a href="/feed.atom">feed</a></p>
<div class="row">
<div class="column">
<img src="/venus.jpg" alt="venus flytraps and moss" style="width:100%">
</div>
<div class="column">
<img src="/forest.jpg" alt="a coastal pine savannah forest" style="width:100%">
</div>
<div class="column">
<img src="/pitcher.jpg" alt="a cluster of pitcher plants" style="width:100%">
</div>
</div>
</div>
<h2>init</h2>
<p><em>september 30th 2023</em></p>
<p>my name is maren. i use she or they pronouns and i'm a trans woman. i don't want to write about that here but i want to name it so that other transfems see me when they find me, because i like to see them when i find them too.</p>
@ -34,11 +9,3 @@
<p>i'm inspired by cooperativism and anarchism and permacomputing and diy culture and other things too.</p>
<p>i help <a href="https://firestorm.coop">firestorm coop</a> with tech things, and i do computer for fun with a scrappy gay cohort calling ourselves <a href="https://wiki.bunk.computer">bunk computer club</a>.</p>
<div class="foot">
<p>see ya later</p>
<p><a href="https://creativecommons.org/publicdomain/zero/1.0/">cc0</a></p>
</div>
</body>
</html>

View file

@ -1,29 +1,3 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/style.css">
<link href="/favicon.ico" type="image/x-icon" rel="icon"><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon">
<title>still, green moss</title>
</head>
<body>
<div class="head">
<h1>thiss <a href="https://en.wikipedia.org/wiki/Moss">moss</a> iss <a href="https://en.wikipedia.org/wiki/Silence">still</a> <a href="https://en.wikipedia.org/wiki/Green">greenn</a></h1>
<p><a href="/">home</a> | <a href="/blog">blog</a> | <a href="/links">links</a> | <a href="/now">now</a> | <a href="/feed.atom">feed</a></p>
<div class="row">
<div class="column">
<img src="/venus.jpg" alt="venus flytraps and moss" style="width:100%">
</div>
<div class="column">
<img src="/forest.jpg" alt="a coastal pine savannah forest" style="width:100%">
</div>
<div class="column">
<img src="/pitcher.jpg" alt="a cluster of pitcher plants" style="width:100%">
</div>
</div>
</div>
<h2>presentation.sh</h2>
<p><em>february 18th 2024</em></p>
@ -32,10 +6,3 @@
<p>i did this for something recently and it was really fun. i put some example code in git <a href="https://git.bunk.computer/maren/presentationdotsh">which you can look at here</a></p>
<div class="foot">
<p>see ya later</p>
<p><a href="https://creativecommons.org/publicdomain/zero/1.0/">cc0</a></p>
</div>
</body>
</html>

View file

@ -1,29 +1,3 @@
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/style.css">
<link href="/favicon.ico" type="image/x-icon" rel="icon"><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon">
<title>still, green moss</title>
</head>
<body>
<div class="head">
<h1>thiss <a href="https://en.wikipedia.org/wiki/Moss">moss</a> iss <a href="https://en.wikipedia.org/wiki/Silence">still</a> <a href="https://en.wikipedia.org/wiki/Green">greenn</a></h1>
<p><a href="/">home</a> | <a href="/blog">blog</a> | <a href="/links">links</a> | <a href="/now">now</a> | <a href="/feed.atom">feed</a></p>
<div class="row">
<div class="column">
<img src="/venus.jpg" alt="venus flytraps and moss" style="width:100%">
</div>
<div class="column">
<img src="/forest.jpg" alt="a coastal pine savannah forest" style="width:100%">
</div>
<div class="column">
<img src="/pitcher.jpg" alt="a cluster of pitcher plants" style="width:100%">
</div>
</div>
</div>
<h2>things i am thankful for from 2023</h2>
<p><em>december 27th 2023</em></p>
@ -68,11 +42,3 @@
<li><a href="https://en.wikipedia.org/wiki/The_Faggots_%26_Their_Friends_Between_Revolutions">the faggots and their friends between revolutions</a>, <a href="https://en.wikipedia.org/wiki/Larry_Mitchell_(author)">mitchell</a></li>
</ul>
</blockquote>
<div class="foot">
<p>see ya later</p>
<p><a href="https://creativecommons.org/publicdomain/zero/1.0/">cc0</a></p>
</div>
</body>
</html>