From 9414e497488f0634367c34cec4a4415dea87aa60 Mon Sep 17 00:00:00 2001 From: glenneth1 Date: Tue, 3 Dec 2024 06:29:47 +0300 Subject: [PATCH] feat: Add build and serve scripts, improve tag styling - Add build.sh for automatic markdown conversion - Add serve.sh for local development with live-server - Update tag styling to use accent-yellow for better visibility - Add RSS feed generation - Update markdown-to-html conversion with improved tag support --- build.sh | 33 + .../posts/2024-12-03-practical-scheme.html | 35 +- content/posts/template.html | 2 +- deploy.sh | 10 +- .../posts/2024-12-03-practical-scheme.html | 35 +- deploy/content/posts/template.html | 2 +- deploy/dist/styles.css | 2 +- deploy/feed.xml | 622 ++++++++++++++++++ deploy/index.html | 64 +- deploy/js/generate-rss.js | 111 ++++ deploy/js/md-to-html.js | 37 +- dist/styles.css | 2 +- feed.xml | 622 ++++++++++++++++++ index.html | 64 +- package-lock.json | 52 ++ package.json | 1 + serve.sh | 30 + src/js/generate-rss.js | 111 ++++ src/js/md-to-html.js | 35 +- tailwind.config.js | 114 +++- website-deploy.zip | Bin 77571 -> 97488 bytes 21 files changed, 1807 insertions(+), 177 deletions(-) create mode 100755 build.sh create mode 100644 deploy/feed.xml create mode 100644 deploy/js/generate-rss.js create mode 100644 feed.xml create mode 100755 serve.sh create mode 100644 src/js/generate-rss.js diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..336b0e9 --- /dev/null +++ b/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Directory containing markdown files +MD_DIR="content/posts" +CONVERTED_COUNT=0 + +echo "Checking for new markdown files..." + +# Loop through all markdown files +for md_file in "$MD_DIR"/*.md; do + # Skip if no markdown files found + [[ -e "$md_file" ]] || continue + + # Get the corresponding HTML filename + html_file="${md_file%.md}.html" + + # Check if HTML file doesn't exist or markdown file is newer + if [[ ! -f "$html_file" ]] || [[ "$md_file" -nt "$html_file" ]]; then + echo "Converting: $md_file" + node src/js/md-to-html.js "$md_file" + ((CONVERTED_COUNT++)) + fi +done + +if [ $CONVERTED_COUNT -eq 0 ]; then + echo "No new markdown files to convert." +else + echo "Converted $CONVERTED_COUNT file(s)." +fi + +# Run the deploy script +echo "Running deploy script..." +./deploy.sh diff --git a/content/posts/2024-12-03-practical-scheme.html b/content/posts/2024-12-03-practical-scheme.html index d766567..790df4b 100644 --- a/content/posts/2024-12-03-practical-scheme.html +++ b/content/posts/2024-12-03-practical-scheme.html @@ -6,8 +6,9 @@ - + Beyond Theory: Building Practical Tools with Guile Scheme - Glenn Thompson + -