From e628f49f23ddf94ce040434f2a60c15109d009bb Mon Sep 17 00:00:00 2001
From: GLENN THOMPSON
Date: Fri, 14 Mar 2025 06:23:06 +0300
Subject: [PATCH] Add blog post: Lessons Learned from Custom Static Site
Generator
- Add new blog post about lessons learned from building a custom SSG\n- Focus on content-driven development and simplicity principles\n- Update build script for better development experience\n- Regenerate site index and RSS feed
---
build.sh | 123 +++++++++--
...2025-03-12-lessons-learned-custom-ssg.html | 196 ++++++++++++++++++
.../2025-03-12-lessons-learned-custom-ssg.md | 101 +++++++++
...2025-03-12-lessons-learned-custom-ssg.html | 196 ++++++++++++++++++
deploy/feed.xml | 84 +++++++-
deploy/index.html | 19 ++
feed.xml | 84 +++++++-
index.html | 19 ++
js/md-to-html.js | 4 +-
9 files changed, 799 insertions(+), 27 deletions(-)
create mode 100644 content/posts/2025-03-12-lessons-learned-custom-ssg.html
create mode 100644 content/posts/2025-03-12-lessons-learned-custom-ssg.md
create mode 100644 deploy/content/posts/2025-03-12-lessons-learned-custom-ssg.html
diff --git a/build.sh b/build.sh
index 25fd677..bd693cc 100755
--- a/build.sh
+++ b/build.sh
@@ -1,59 +1,118 @@
#!/bin/bash
# Default settings
-PORT=8080
+PORT=9000 # Changed default to avoid common conflicts
SERVE=false
+DEBUG=false
# Parse command line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
--serve) SERVE=true ;;
--port) PORT="$2"; shift ;;
+ --debug) DEBUG=true ;;
*) echo "Unknown parameter: $1"; exit 1 ;;
esac
shift
done
+# Function to log debug messages
+log_debug() {
+ if [ "$DEBUG" = true ]; then
+ echo "[DEBUG] $1"
+ fi
+}
+
# Function to cleanup and exit
cleanup() {
echo -e "\nShutting down server..."
- # Kill any running live-server processes
pkill -f "live-server.*:$PORT" 2>/dev/null
exit 0
}
+# Function to check if a port is in use
+check_port() {
+ local port=$1
+ nc -z localhost "$port" >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ return 0 # Port is in use
+ fi
+ return 1 # Port is free
+}
+
+# Function to find next available port
+find_available_port() {
+ local port=$1
+ local max_port=$((port + 100)) # Don't search indefinitely
+
+ while [ "$port" -lt "$max_port" ]; do
+ if ! check_port "$port"; then
+ echo "$port"
+ return 0
+ fi
+ port=$((port + 1))
+ done
+
+ echo "Error: No available ports found between $1 and $max_port" >&2
+ exit 1
+}
+
# Set up trap for Ctrl+C (SIGINT) if serving
if [ "$SERVE" = true ]; then
trap cleanup SIGINT
fi
-# Directory containing markdown files
+# Directory structure
MD_DIR="content/posts"
-DEPLOY_DIR="deploy/content/posts"
-CONVERTED_COUNT=0
+DEPLOY_DIR="deploy"
+POSTS_DEPLOY_DIR="$DEPLOY_DIR/content/posts"
+DIST_DIR="$DEPLOY_DIR/dist"
+SRC_DIR="src"
-# Create deploy directory if it doesn't exist
-mkdir -p "$DEPLOY_DIR"
-mkdir -p "$MD_DIR" # Ensure local directory exists too
+# Ensure all required directories exist
+dirs_to_create=(
+ "$MD_DIR"
+ "$DEPLOY_DIR"
+ "$POSTS_DEPLOY_DIR"
+ "$DIST_DIR"
+ "$SRC_DIR"
+)
+
+for dir in "${dirs_to_create[@]}"; do
+ if [ ! -d "$dir" ]; then
+ echo "Creating directory: $dir"
+ mkdir -p "$dir"
+ fi
+done
+
+# Build CSS first to ensure styles are available
+echo "Building CSS..."
+if ! npm run build; then
+ echo "Error: Failed to build CSS"
+ exit 1
+fi
echo "Checking for new markdown files..."
+CONVERTED_COUNT=0
# 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 base name of the file
base_name=$(basename "$md_file")
- # Create the HTML filenames
- html_file="$DEPLOY_DIR/${base_name%.md}.html"
+ html_file="$POSTS_DEPLOY_DIR/${base_name%.md}.html"
local_html_file="$MD_DIR/${base_name%.md}.html"
+ log_debug "Processing $base_name"
+
# Check if HTML file doesn't exist or markdown file is newer
if [[ ! -f "$html_file" ]] || [[ "$md_file" -nt "$html_file" ]]; then
echo "Converting $base_name to HTML..."
- node src/js/md-to-html.js "$md_file" "$html_file"
- # Also copy to local directory for development
+ if ! node "$SRC_DIR/js/md-to-html.js" "$md_file" "$html_file"; then
+ echo "Error: Failed to convert $base_name to HTML"
+ exit 1
+ fi
cp "$html_file" "$local_html_file"
((CONVERTED_COUNT++))
fi
@@ -63,33 +122,51 @@ echo "Converted $CONVERTED_COUNT new or modified files"
# Update summaries in index.html
echo "Updating blog post summaries in index.html..."
-npm run update-summaries
+if ! npm run update-summaries; then
+ echo "Error: Failed to update summaries"
+ exit 1
+fi
# Generate RSS feed
echo "Generating RSS feed..."
-node src/js/generate-rss.js
+if ! node "$SRC_DIR/js/generate-rss.js"; then
+ echo "Error: Failed to generate RSS feed"
+ exit 1
+fi
-# Run the deploy script
-echo "Running deploy script..."
-./deploy.sh
+# Copy necessary files to deploy directory
+echo "Copying files to deploy directory..."
+cp index.html "$DEPLOY_DIR/"
+cp -r dist/* "$DEPLOY_DIR/dist/"
# If --serve flag is provided, start the server
if [ "$SERVE" = true ]; then
- echo "Starting local server on port $PORT..."
- echo "Visit http://localhost:$PORT to view your site"
+ # Find available port if specified port is in use
+ FINAL_PORT=$(find_available_port "$PORT")
+
+ echo "Starting local server on port $FINAL_PORT..."
+ echo "Visit http://localhost:$FINAL_PORT to view your site"
echo "Press Ctrl+C to stop the server"
# Copy deploy files to root for local development
- cp -r deploy/* .
+ cp -r "$DEPLOY_DIR"/* .
+
+ # Ensure live-server exists
+ if [ ! -f "./node_modules/.bin/live-server" ]; then
+ echo "Error: live-server not found. Please run 'npm install' first."
+ exit 1
+ fi
# Start live-server with specific options
./node_modules/.bin/live-server \
- --port=$PORT \
+ --port="$FINAL_PORT" \
--no-browser \
+ --watch="*.html,*.css,content/**/*.html" \
+ --wait=50 \
--quiet \
--ignore=node_modules \
.
-
+
# Keep script running until Ctrl+C
wait
fi
diff --git a/content/posts/2025-03-12-lessons-learned-custom-ssg.html b/content/posts/2025-03-12-lessons-learned-custom-ssg.html
new file mode 100644
index 0000000..e1b1977
--- /dev/null
+++ b/content/posts/2025-03-12-lessons-learned-custom-ssg.html
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+ "Lessons Learned: One Year with a Custom Static Site Generator" - Glenn Thompson
+
+
+
+
+
+
+
+
+
+
+
+
+
"Lessons Learned: One Year with a Custom Static Site Generator"
+
+
+ •
+ 6 min read
+ •
+ By Glenn Thompson
+
+
+
+ [webdevelopmentjavascriptstatic-sitelessons]
+
+
+
+
+
It's been just over a year since I transitioned from Haunt to my own custom static site generator for this website. What started as an experiment to gain more control over my publishing workflow has evolved into a valuable learning experience that has shaped how I approach web development projects.
+
In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+
The Journey of Evolution
+
From Simple Beginnings
+
When I first built my static site generator, it was remarkably simple - just the essential features needed to convert my writing into a website. No extra features, no complex configurations, just the basics.
+
Today, the system has evolved considerably, but not through grand design or elaborate planning. Instead, it grew organically based on real needs and actual usage. This organic growth taught me valuable lessons about software development.
+
Lesson 1: Features Should Emerge from Usage
+
Many of the features in my static site generator emerged from actual writing and publishing needs:
+
+
The Draft System When I found myself working on multiple posts simultaneously, I needed a way to keep unfinished posts separate from published content. This led to the draft system, which now helps me manage my writing workflow effectively.
+
+
Tag Organization As my collection of posts grew, I needed a way to organize related content. The tag system emerged naturally from this need, rather than being built upfront based on assumptions about how I might want to organize content.
+
+
Content Validation After accidentally publishing a post with a malformed date and another with a duplicate title, I added validation checks. These weren't part of the initial design but came from real-world publishing mishaps.
+
+
+
Lesson 2: Simplicity Drives Performance
+
One of the most surprising lessons was how simplicity led to better performance:
+
+
Static HTML Generation By generating plain HTML files, the site loads quickly without any client-side processing. There's no JavaScript framework, no hydration, and no complex build process - just simple, fast HTML.
+
+
Incremental Builds The build system only processes files that have changed. This means that even with hundreds of posts, updates are nearly instantaneous because only the necessary files are rebuilt.
+
+
Minimal JavaScript By keeping JavaScript to a minimum and focusing on progressive enhancement, the site remains fast and accessible, even on slower connections.
+
+
+
Lesson 3: Developer Experience Matters
+
A good developer experience has proven crucial for maintaining motivation to write and publish:
+
+
Smart Port Management After encountering port conflicts with other services, I added automatic port detection and fallback. The system now checks if a port is in use and automatically finds the next available one, eliminating the frustration of manual port configuration.
+
+
Clear Error Messages When something goes wrong (like a failed CSS build or HTML conversion), the system provides clear, actionable error messages. This immediate feedback helps quickly identify and fix issues during the development process.
+
+
Automated Validation The build system validates the environment before starting, checking for required directories and dependencies. These checks catch common setup issues early, making the development process smoother.
+
+
+
Lesson 4: Content Drives Development
+
Perhaps the most important lesson has been letting content needs drive development:
+
+
Markdown Features I only added support for additional Markdown features (like tables and task lists) when I actually needed them in my writing. This prevented feature bloat and kept the system focused.
+
+
RSS Feed The RSS feed wasn't part of the initial design but was added when the content volume grew enough to warrant it. This is a pattern I've seen repeatedly - features are most valuable when they solve real, existing needs.
+
+
Summary Generation The way post summaries are generated has evolved based on the actual content I write. Initially, it was a simple character count, but it now intelligently extracts meaningful previews based on content structure.
+
+
+
Looking Forward
+
This project has taught me that the best software often evolves gradually in response to real needs rather than being built all at once from a grand design. It's a lesson that applies well beyond static site generators - it's about building software that serves actual needs rather than imagined ones.
+
Just today, while writing this post, I encountered and solved several development workflow issues. Instead of being frustrated by these challenges, I saw them as opportunities to improve the system. The resulting changes - like automatic port detection and better error handling - weren't part of any grand plan. They emerged naturally from real usage and made the system better in practical, meaningful ways.
+
The system isn't perfect, and it probably never will be. But it's continuously improving in ways that matter for my writing and publishing workflow. That, I've learned, is far more valuable than technical perfection.
+
If you're considering building your own tools, remember:
+
+
Start simple and let features emerge from actual usage
+
Focus on the experience - both for users and developers
+
Let real needs guide development
+
Embrace incremental improvements
+
Value simplicity - it often leads to better performance and maintainability
+
Use real-world problems as opportunities for improvement
+
+
These lessons have influenced not just how I approach this project, but how I think about software development in general. Sometimes, the best insights come from the simplest projects - and often, they come right in the middle of writing about them.
+
Looking Back and Forward
+
Reflecting on this journey, the most valuable insight has been understanding that great software evolves naturally from real needs. Every feature in my static site generator—from the draft system to the validation checks—emerged from actual usage rather than upfront planning.
+
This experience has fundamentally changed how I approach software development. Instead of trying to build the perfect system from the start, I've learned to:
+
+
Start with the simplest solution that works
+
Let real usage guide feature development
+
Focus on maintainability over complexity
+
Prioritize the developer experience
+
Keep performance in mind at every step
+
+
These principles have not only made my static site generator better but have also influenced how I approach every new project. Sometimes the best insights come from the simplest projects, and often they come right in the middle of writing about them.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/content/posts/2025-03-12-lessons-learned-custom-ssg.md b/content/posts/2025-03-12-lessons-learned-custom-ssg.md
new file mode 100644
index 0000000..0cf5b38
--- /dev/null
+++ b/content/posts/2025-03-12-lessons-learned-custom-ssg.md
@@ -0,0 +1,101 @@
+---
+title: "Lessons Learned: One Year with a Custom Static Site Generator"
+date: 2025-03-13
+tags: [web, development, javascript, static-site, lessons]
+---
+
+It's been just over a year since I [transitioned from Haunt to my own custom static site generator](/content/posts/2025-01-02-from-haunt-to-custom.html) for this website. What started as an experiment to gain more control over my publishing workflow has evolved into a valuable learning experience that has shaped how I approach web development projects.
+
+In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+
+## The Journey of Evolution
+
+### From Simple Beginnings
+
+When I first built my static site generator, it was remarkably simple - just the essential features needed to convert my writing into a website. No extra features, no complex configurations, just the basics.
+
+Today, the system has evolved considerably, but not through grand design or elaborate planning. Instead, it grew organically based on real needs and actual usage. This organic growth taught me valuable lessons about software development.
+
+### Lesson 1: Features Should Emerge from Usage
+
+Many of the features in my static site generator emerged from actual writing and publishing needs:
+
+1. **The Draft System**
+When I found myself working on multiple posts simultaneously, I needed a way to keep unfinished posts separate from published content. This led to the draft system, which now helps me manage my writing workflow effectively.
+
+2. **Tag Organization**
+As my collection of posts grew, I needed a way to organize related content. The tag system emerged naturally from this need, rather than being built upfront based on assumptions about how I might want to organize content.
+
+3. **Content Validation**
+After accidentally publishing a post with a malformed date and another with a duplicate title, I added validation checks. These weren't part of the initial design but came from real-world publishing mishaps.
+
+### Lesson 2: Simplicity Drives Performance
+
+One of the most surprising lessons was how simplicity led to better performance:
+
+1. **Static HTML Generation**
+By generating plain HTML files, the site loads quickly without any client-side processing. There's no JavaScript framework, no hydration, and no complex build process - just simple, fast HTML.
+
+2. **Incremental Builds**
+The build system only processes files that have changed. This means that even with hundreds of posts, updates are nearly instantaneous because only the necessary files are rebuilt.
+
+3. **Minimal JavaScript**
+By keeping JavaScript to a minimum and focusing on progressive enhancement, the site remains fast and accessible, even on slower connections.
+
+### Lesson 3: Developer Experience Matters
+
+A good developer experience has proven crucial for maintaining motivation to write and publish:
+
+1. **Smart Port Management**
+After encountering port conflicts with other services, I added automatic port detection and fallback. The system now checks if a port is in use and automatically finds the next available one, eliminating the frustration of manual port configuration.
+
+2. **Clear Error Messages**
+When something goes wrong (like a failed CSS build or HTML conversion), the system provides clear, actionable error messages. This immediate feedback helps quickly identify and fix issues during the development process.
+
+3. **Automated Validation**
+The build system validates the environment before starting, checking for required directories and dependencies. These checks catch common setup issues early, making the development process smoother.
+
+### Lesson 4: Content Drives Development
+
+Perhaps the most important lesson has been letting content needs drive development:
+
+1. **Markdown Features**
+I only added support for additional Markdown features (like tables and task lists) when I actually needed them in my writing. This prevented feature bloat and kept the system focused.
+
+2. **RSS Feed**
+The RSS feed wasn't part of the initial design but was added when the content volume grew enough to warrant it. This is a pattern I've seen repeatedly - features are most valuable when they solve real, existing needs.
+
+3. **Summary Generation**
+The way post summaries are generated has evolved based on the actual content I write. Initially, it was a simple character count, but it now intelligently extracts meaningful previews based on content structure.
+
+## Looking Forward
+
+This project has taught me that the best software often evolves gradually in response to real needs rather than being built all at once from a grand design. It's a lesson that applies well beyond static site generators - it's about building software that serves actual needs rather than imagined ones.
+
+Just today, while writing this post, I encountered and solved several development workflow issues. Instead of being frustrated by these challenges, I saw them as opportunities to improve the system. The resulting changes - like automatic port detection and better error handling - weren't part of any grand plan. They emerged naturally from real usage and made the system better in practical, meaningful ways.
+
+The system isn't perfect, and it probably never will be. But it's continuously improving in ways that matter for my writing and publishing workflow. That, I've learned, is far more valuable than technical perfection.
+
+If you're considering building your own tools, remember:
+1. Start simple and let features emerge from actual usage
+2. Focus on the experience - both for users and developers
+3. Let real needs guide development
+4. Embrace incremental improvements
+5. Value simplicity - it often leads to better performance and maintainability
+6. Use real-world problems as opportunities for improvement
+
+These lessons have influenced not just how I approach this project, but how I think about software development in general. Sometimes, the best insights come from the simplest projects - and often, they come right in the middle of writing about them.
+
+## Looking Back and Forward
+
+Reflecting on this journey, the most valuable insight has been understanding that great software evolves naturally from real needs. Every feature in my static site generator—from the draft system to the validation checks—emerged from actual usage rather than upfront planning.
+
+This experience has fundamentally changed how I approach software development. Instead of trying to build the perfect system from the start, I've learned to:
+
+1. Start with the simplest solution that works
+2. Let real usage guide feature development
+3. Focus on maintainability over complexity
+4. Prioritize the developer experience
+5. Keep performance in mind at every step
+
+These principles have not only made my static site generator better but have also influenced how I approach every new project. Sometimes the best insights come from the simplest projects, and often they come right in the middle of writing about them.
diff --git a/deploy/content/posts/2025-03-12-lessons-learned-custom-ssg.html b/deploy/content/posts/2025-03-12-lessons-learned-custom-ssg.html
new file mode 100644
index 0000000..e1b1977
--- /dev/null
+++ b/deploy/content/posts/2025-03-12-lessons-learned-custom-ssg.html
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+ "Lessons Learned: One Year with a Custom Static Site Generator" - Glenn Thompson
+
+
+
+
+
+
+
+
+
+
+
+
+
"Lessons Learned: One Year with a Custom Static Site Generator"
+
+
+ •
+ 6 min read
+ •
+ By Glenn Thompson
+
+
+
+ [webdevelopmentjavascriptstatic-sitelessons]
+
+
+
+
+
It's been just over a year since I transitioned from Haunt to my own custom static site generator for this website. What started as an experiment to gain more control over my publishing workflow has evolved into a valuable learning experience that has shaped how I approach web development projects.
+
In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+
The Journey of Evolution
+
From Simple Beginnings
+
When I first built my static site generator, it was remarkably simple - just the essential features needed to convert my writing into a website. No extra features, no complex configurations, just the basics.
+
Today, the system has evolved considerably, but not through grand design or elaborate planning. Instead, it grew organically based on real needs and actual usage. This organic growth taught me valuable lessons about software development.
+
Lesson 1: Features Should Emerge from Usage
+
Many of the features in my static site generator emerged from actual writing and publishing needs:
+
+
The Draft System When I found myself working on multiple posts simultaneously, I needed a way to keep unfinished posts separate from published content. This led to the draft system, which now helps me manage my writing workflow effectively.
+
+
Tag Organization As my collection of posts grew, I needed a way to organize related content. The tag system emerged naturally from this need, rather than being built upfront based on assumptions about how I might want to organize content.
+
+
Content Validation After accidentally publishing a post with a malformed date and another with a duplicate title, I added validation checks. These weren't part of the initial design but came from real-world publishing mishaps.
+
+
+
Lesson 2: Simplicity Drives Performance
+
One of the most surprising lessons was how simplicity led to better performance:
+
+
Static HTML Generation By generating plain HTML files, the site loads quickly without any client-side processing. There's no JavaScript framework, no hydration, and no complex build process - just simple, fast HTML.
+
+
Incremental Builds The build system only processes files that have changed. This means that even with hundreds of posts, updates are nearly instantaneous because only the necessary files are rebuilt.
+
+
Minimal JavaScript By keeping JavaScript to a minimum and focusing on progressive enhancement, the site remains fast and accessible, even on slower connections.
+
+
+
Lesson 3: Developer Experience Matters
+
A good developer experience has proven crucial for maintaining motivation to write and publish:
+
+
Smart Port Management After encountering port conflicts with other services, I added automatic port detection and fallback. The system now checks if a port is in use and automatically finds the next available one, eliminating the frustration of manual port configuration.
+
+
Clear Error Messages When something goes wrong (like a failed CSS build or HTML conversion), the system provides clear, actionable error messages. This immediate feedback helps quickly identify and fix issues during the development process.
+
+
Automated Validation The build system validates the environment before starting, checking for required directories and dependencies. These checks catch common setup issues early, making the development process smoother.
+
+
+
Lesson 4: Content Drives Development
+
Perhaps the most important lesson has been letting content needs drive development:
+
+
Markdown Features I only added support for additional Markdown features (like tables and task lists) when I actually needed them in my writing. This prevented feature bloat and kept the system focused.
+
+
RSS Feed The RSS feed wasn't part of the initial design but was added when the content volume grew enough to warrant it. This is a pattern I've seen repeatedly - features are most valuable when they solve real, existing needs.
+
+
Summary Generation The way post summaries are generated has evolved based on the actual content I write. Initially, it was a simple character count, but it now intelligently extracts meaningful previews based on content structure.
+
+
+
Looking Forward
+
This project has taught me that the best software often evolves gradually in response to real needs rather than being built all at once from a grand design. It's a lesson that applies well beyond static site generators - it's about building software that serves actual needs rather than imagined ones.
+
Just today, while writing this post, I encountered and solved several development workflow issues. Instead of being frustrated by these challenges, I saw them as opportunities to improve the system. The resulting changes - like automatic port detection and better error handling - weren't part of any grand plan. They emerged naturally from real usage and made the system better in practical, meaningful ways.
+
The system isn't perfect, and it probably never will be. But it's continuously improving in ways that matter for my writing and publishing workflow. That, I've learned, is far more valuable than technical perfection.
+
If you're considering building your own tools, remember:
+
+
Start simple and let features emerge from actual usage
+
Focus on the experience - both for users and developers
+
Let real needs guide development
+
Embrace incremental improvements
+
Value simplicity - it often leads to better performance and maintainability
+
Use real-world problems as opportunities for improvement
+
+
These lessons have influenced not just how I approach this project, but how I think about software development in general. Sometimes, the best insights come from the simplest projects - and often, they come right in the middle of writing about them.
+
Looking Back and Forward
+
Reflecting on this journey, the most valuable insight has been understanding that great software evolves naturally from real needs. Every feature in my static site generator—from the draft system to the validation checks—emerged from actual usage rather than upfront planning.
+
This experience has fundamentally changed how I approach software development. Instead of trying to build the perfect system from the start, I've learned to:
+
+
Start with the simplest solution that works
+
Let real usage guide feature development
+
Focus on maintainability over complexity
+
Prioritize the developer experience
+
Keep performance in mind at every step
+
+
These principles have not only made my static site generator better but have also influenced how I approach every new project. Sometimes the best insights come from the simplest projects, and often they come right in the middle of writing about them.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/deploy/feed.xml b/deploy/feed.xml
index edb3452..e722dbc 100644
--- a/deploy/feed.xml
+++ b/deploy/feed.xml
@@ -6,7 +6,7 @@
https://glenneth.org
en-us
- Sat, 08 Mar 2025 10:36:20 GMT
+ Thu, 13 Mar 2025 04:58:18 GMTAesthetic Meets Ergonomics: My Deep Dive into the Glove80 Keyboard
@@ -41,6 +41,88 @@
["personal", "tech", "keyboards", "glove80"]
+
+ Lessons Learned: One Year with a Custom Static Site Generator
+ In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+ It's been just over a year since I transitioned from Haunt to my own custom static site generator for this website. What started as an experiment to gain more control over my publishing workflow has evolved into a valuable learning experience that has shaped how I approach web development projects.
+
In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+
The Journey of Evolution
+
From Simple Beginnings
+
When I first built my static site generator, it was remarkably simple - just the essential features needed to convert my writing into a website. No extra features, no complex configurations, just the basics.
+
Today, the system has evolved considerably, but not through grand design or elaborate planning. Instead, it grew organically based on real needs and actual usage. This organic growth taught me valuable lessons about software development.
+
Lesson 1: Features Should Emerge from Usage
+
Many of the features in my static site generator emerged from actual writing and publishing needs:
+
+
The Draft System When I found myself working on multiple posts simultaneously, I needed a way to keep unfinished posts separate from published content. This led to the draft system, which now helps me manage my writing workflow effectively.
+
+
Tag Organization As my collection of posts grew, I needed a way to organize related content. The tag system emerged naturally from this need, rather than being built upfront based on assumptions about how I might want to organize content.
+
+
Content Validation After accidentally publishing a post with a malformed date and another with a duplicate title, I added validation checks. These weren't part of the initial design but came from real-world publishing mishaps.
+
+
+
Lesson 2: Simplicity Drives Performance
+
One of the most surprising lessons was how simplicity led to better performance:
+
+
Static HTML Generation By generating plain HTML files, the site loads quickly without any client-side processing. There's no JavaScript framework, no hydration, and no complex build process - just simple, fast HTML.
+
+
Incremental Builds The build system only processes files that have changed. This means that even with hundreds of posts, updates are nearly instantaneous because only the necessary files are rebuilt.
+
+
Minimal JavaScript By keeping JavaScript to a minimum and focusing on progressive enhancement, the site remains fast and accessible, even on slower connections.
+
+
+
Lesson 3: Developer Experience Matters
+
A good developer experience has proven crucial for maintaining motivation to write and publish:
+
+
Smart Port Management After encountering port conflicts with other services, I added automatic port detection and fallback. The system now checks if a port is in use and automatically finds the next available one, eliminating the frustration of manual port configuration.
+
+
Clear Error Messages When something goes wrong (like a failed CSS build or HTML conversion), the system provides clear, actionable error messages. This immediate feedback helps quickly identify and fix issues during the development process.
+
+
Automated Validation The build system validates the environment before starting, checking for required directories and dependencies. These checks catch common setup issues early, making the development process smoother.
+
+
+
Lesson 4: Content Drives Development
+
Perhaps the most important lesson has been letting content needs drive development:
+
+
Markdown Features I only added support for additional Markdown features (like tables and task lists) when I actually needed them in my writing. This prevented feature bloat and kept the system focused.
+
+
RSS Feed The RSS feed wasn't part of the initial design but was added when the content volume grew enough to warrant it. This is a pattern I've seen repeatedly - features are most valuable when they solve real, existing needs.
+
+
Summary Generation The way post summaries are generated has evolved based on the actual content I write. Initially, it was a simple character count, but it now intelligently extracts meaningful previews based on content structure.
+
+
+
Looking Forward
+
This project has taught me that the best software often evolves gradually in response to real needs rather than being built all at once from a grand design. It's a lesson that applies well beyond static site generators - it's about building software that serves actual needs rather than imagined ones.
+
Just today, while writing this post, I encountered and solved several development workflow issues. Instead of being frustrated by these challenges, I saw them as opportunities to improve the system. The resulting changes - like automatic port detection and better error handling - weren't part of any grand plan. They emerged naturally from real usage and made the system better in practical, meaningful ways.
+
The system isn't perfect, and it probably never will be. But it's continuously improving in ways that matter for my writing and publishing workflow. That, I've learned, is far more valuable than technical perfection.
+
If you're considering building your own tools, remember:
+
+
Start simple and let features emerge from actual usage
+
Focus on the experience - both for users and developers
+
Let real needs guide development
+
Embrace incremental improvements
+
Value simplicity - it often leads to better performance and maintainability
+
Use real-world problems as opportunities for improvement
+
+
These lessons have influenced not just how I approach this project, but how I think about software development in general. Sometimes, the best insights come from the simplest projects - and often, they come right in the middle of writing about them.
+
Looking Back and Forward
+
Reflecting on this journey, the most valuable insight has been understanding that great software evolves naturally from real needs. Every feature in my static site generator—from the draft system to the validation checks—emerged from actual usage rather than upfront planning.
+
This experience has fundamentally changed how I approach software development. Instead of trying to build the perfect system from the start, I've learned to:
+
+
Start with the simplest solution that works
+
Let real usage guide feature development
+
Focus on maintainability over complexity
+
Prioritize the developer experience
+
Keep performance in mind at every step
+
+
These principles have not only made my static site generator better but have also influenced how I approach every new project. Sometimes the best insights come from the simplest projects, and often they come right in the middle of writing about them.
+]]>
+ https://glenneth.org/content/posts/2025-03-12-lessons-learned-custom-ssg.html
+ https://glenneth.org/content/posts/2025-03-12-lessons-learned-custom-ssg.html
+ Thu, 13 Mar 2025 00:00:00 GMT
+ Glenn Thompson
+ [web, development, javascript, static-site, lessons]
+
+
My Development Environment in 2025: From Editor to DeploymentA comprehensive look at my current development setup in 2025, covering everything from my GNU Guix system foundation to editor configurations, terminal tools, and deployment processes.
diff --git a/deploy/index.html b/deploy/index.html
index c17ffcb..b26e6ed 100644
--- a/deploy/index.html
+++ b/deploy/index.html
@@ -60,6 +60,25 @@
It's been just over a year since I transitioned from Haunt to my own custom static site generator for this website. What started as an experiment to gain more control over my publishing workflow has e...
+
+ webdevelopmentjavascriptstatic-sitelessons
+
+
+
+
Tech
diff --git a/feed.xml b/feed.xml
index edb3452..e722dbc 100644
--- a/feed.xml
+++ b/feed.xml
@@ -6,7 +6,7 @@
https://glenneth.org
en-us
- Sat, 08 Mar 2025 10:36:20 GMT
+ Thu, 13 Mar 2025 04:58:18 GMTAesthetic Meets Ergonomics: My Deep Dive into the Glove80 Keyboard
@@ -41,6 +41,88 @@
["personal", "tech", "keyboards", "glove80"]
+
+ Lessons Learned: One Year with a Custom Static Site Generator
+ In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+ It's been just over a year since I transitioned from Haunt to my own custom static site generator for this website. What started as an experiment to gain more control over my publishing workflow has evolved into a valuable learning experience that has shaped how I approach web development projects.
+
In this post, I'll share the key lessons I've learned and insights I've gained from building and maintaining my own static site generator. While the technical details are interesting, the real value has been in the broader lessons about software development, user experience, and the balance between complexity and simplicity.
+
The Journey of Evolution
+
From Simple Beginnings
+
When I first built my static site generator, it was remarkably simple - just the essential features needed to convert my writing into a website. No extra features, no complex configurations, just the basics.
+
Today, the system has evolved considerably, but not through grand design or elaborate planning. Instead, it grew organically based on real needs and actual usage. This organic growth taught me valuable lessons about software development.
+
Lesson 1: Features Should Emerge from Usage
+
Many of the features in my static site generator emerged from actual writing and publishing needs:
+
+
The Draft System When I found myself working on multiple posts simultaneously, I needed a way to keep unfinished posts separate from published content. This led to the draft system, which now helps me manage my writing workflow effectively.
+
+
Tag Organization As my collection of posts grew, I needed a way to organize related content. The tag system emerged naturally from this need, rather than being built upfront based on assumptions about how I might want to organize content.
+
+
Content Validation After accidentally publishing a post with a malformed date and another with a duplicate title, I added validation checks. These weren't part of the initial design but came from real-world publishing mishaps.
+
+
+
Lesson 2: Simplicity Drives Performance
+
One of the most surprising lessons was how simplicity led to better performance:
+
+
Static HTML Generation By generating plain HTML files, the site loads quickly without any client-side processing. There's no JavaScript framework, no hydration, and no complex build process - just simple, fast HTML.
+
+
Incremental Builds The build system only processes files that have changed. This means that even with hundreds of posts, updates are nearly instantaneous because only the necessary files are rebuilt.
+
+
Minimal JavaScript By keeping JavaScript to a minimum and focusing on progressive enhancement, the site remains fast and accessible, even on slower connections.
+
+
+
Lesson 3: Developer Experience Matters
+
A good developer experience has proven crucial for maintaining motivation to write and publish:
+
+
Smart Port Management After encountering port conflicts with other services, I added automatic port detection and fallback. The system now checks if a port is in use and automatically finds the next available one, eliminating the frustration of manual port configuration.
+
+
Clear Error Messages When something goes wrong (like a failed CSS build or HTML conversion), the system provides clear, actionable error messages. This immediate feedback helps quickly identify and fix issues during the development process.
+
+
Automated Validation The build system validates the environment before starting, checking for required directories and dependencies. These checks catch common setup issues early, making the development process smoother.
+
+
+
Lesson 4: Content Drives Development
+
Perhaps the most important lesson has been letting content needs drive development:
+
+
Markdown Features I only added support for additional Markdown features (like tables and task lists) when I actually needed them in my writing. This prevented feature bloat and kept the system focused.
+
+
RSS Feed The RSS feed wasn't part of the initial design but was added when the content volume grew enough to warrant it. This is a pattern I've seen repeatedly - features are most valuable when they solve real, existing needs.
+
+
Summary Generation The way post summaries are generated has evolved based on the actual content I write. Initially, it was a simple character count, but it now intelligently extracts meaningful previews based on content structure.
+
+
+
Looking Forward
+
This project has taught me that the best software often evolves gradually in response to real needs rather than being built all at once from a grand design. It's a lesson that applies well beyond static site generators - it's about building software that serves actual needs rather than imagined ones.
+
Just today, while writing this post, I encountered and solved several development workflow issues. Instead of being frustrated by these challenges, I saw them as opportunities to improve the system. The resulting changes - like automatic port detection and better error handling - weren't part of any grand plan. They emerged naturally from real usage and made the system better in practical, meaningful ways.
+
The system isn't perfect, and it probably never will be. But it's continuously improving in ways that matter for my writing and publishing workflow. That, I've learned, is far more valuable than technical perfection.
+
If you're considering building your own tools, remember:
+
+
Start simple and let features emerge from actual usage
+
Focus on the experience - both for users and developers
+
Let real needs guide development
+
Embrace incremental improvements
+
Value simplicity - it often leads to better performance and maintainability
+
Use real-world problems as opportunities for improvement
+
+
These lessons have influenced not just how I approach this project, but how I think about software development in general. Sometimes, the best insights come from the simplest projects - and often, they come right in the middle of writing about them.
+
Looking Back and Forward
+
Reflecting on this journey, the most valuable insight has been understanding that great software evolves naturally from real needs. Every feature in my static site generator—from the draft system to the validation checks—emerged from actual usage rather than upfront planning.
+
This experience has fundamentally changed how I approach software development. Instead of trying to build the perfect system from the start, I've learned to:
+
+
Start with the simplest solution that works
+
Let real usage guide feature development
+
Focus on maintainability over complexity
+
Prioritize the developer experience
+
Keep performance in mind at every step
+
+
These principles have not only made my static site generator better but have also influenced how I approach every new project. Sometimes the best insights come from the simplest projects, and often they come right in the middle of writing about them.
+]]>
+ https://glenneth.org/content/posts/2025-03-12-lessons-learned-custom-ssg.html
+ https://glenneth.org/content/posts/2025-03-12-lessons-learned-custom-ssg.html
+ Thu, 13 Mar 2025 00:00:00 GMT
+ Glenn Thompson
+ [web, development, javascript, static-site, lessons]
+
+
My Development Environment in 2025: From Editor to DeploymentA comprehensive look at my current development setup in 2025, covering everything from my GNU Guix system foundation to editor configurations, terminal tools, and deployment processes.
diff --git a/index.html b/index.html
index c17ffcb..b26e6ed 100644
--- a/index.html
+++ b/index.html
@@ -60,6 +60,25 @@
It's been just over a year since I transitioned from Haunt to my own custom static site generator for this website. What started as an experiment to gain more control over my publishing workflow has e...
+
+ webdevelopmentjavascriptstatic-sitelessons
+
+
+
+
Tech
diff --git a/js/md-to-html.js b/js/md-to-html.js
index 0c5fc57..cb8a070 100644
--- a/js/md-to-html.js
+++ b/js/md-to-html.js
@@ -280,7 +280,7 @@ async function updateIndexWithSummaries() {
// Create the HTML for blog posts
const postsHtml = posts.map(post => `
-