commit fccd74ff6f512074334940eb12378d684f1bcafa parent 06528692da2be4c0820d9e9d50efd61a91f7223c Author: Andrew Laack <andrew@laack.co> Date: Sun, 28 Sep 2025 00:19:31 -0500 Updated index Diffstat:
| M | posts/site/index.html | | | 6 | +++--- |
| M | scripts/convert.sh | | | 12 | ++++++++---- |
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/posts/site/index.html b/posts/site/index.html @@ -6,9 +6,9 @@ <link rel='stylesheet' href='style.css'> </head> <body> -<h1>Posts</h1> +<h1>Blog Posts</h1> <ol> -<li><a href='the-sustainability-of-youtube.html'>the-sustainability-of-youtube</a></li> -</ul> +<li><a href='the-sustainability-of-youtube.html'>the-sustainability-of-youtube</a> - <em>2025/9/28</em></li> +</ol> </body> </html> diff --git a/scripts/convert.sh b/scripts/convert.sh @@ -11,17 +11,21 @@ echo "<!DOCTYPE html> <link rel='stylesheet' href='style.css'> </head> <body> -<h1>Posts</h1> +<h1>Blog Posts</h1> <ol>" > "$INDEX_FILE" for FILE in posts/entries/*.md; do [ -e "$FILE" ] || continue BASENAME="$(basename "$FILE" .md)" + pandoc "$FILE" -o "posts/site/$BASENAME.html" -s --css=style.css - - echo "<li><a href='$BASENAME.html'>$BASENAME</a></li>" >> "$INDEX_FILE" + + DATE_LINE=$(grep -E '^## Date: ' "$FILE") + DATE=${DATE_LINE#'## Date: '} + + echo "<li><a href='$BASENAME.html'>$BASENAME</a> - <em>$DATE</em></li>" >> "$INDEX_FILE" done -echo "</ul> +echo "</ol> </body> </html>" >> "$INDEX_FILE"