How by-hahn/blog works
This is a custom Node.js static publishing system. Authors place dated Markdown posts in category directories; a full build parses and validates them, renders post pages and site indexes from templates, and emits static assets and metadata for hosting. Readers then receive complete HTML, while browser-side JavaScript manages theme preference. The README documents additional capabilities, including TOCs, featured posts, category pages, reading time, SEO metadata, and sitemap generation. The build script is excerpted only in part, so edges for documented but unsampled behavior cite the README.
Main entry points: build.js Build orchestrator · template-post.html Post template · template-index.html Index template · theme.js Theme preference
Components 19
Content model
- Markdown posts
posts - Post metadata
posts
Static generation
- Build orchestrator
scripts/build.js - Input validation
scripts/build.js - Content parsing
scripts/build.js - Post rendering
scripts/build.js - TOC generation
scripts/build.js - SEO metadata
scripts/build.js - Homepage generation
scripts/build.js - Category pages
scripts/build.js - Sitemap generation
scripts/build.js
Site experience
- Post template
src/template-post.html - Index template
src/template-index.html - Theme preference
src/assets/js/theme.js - Responsive styling
src/assets/css/main.css
Published site
- Generated site
scripts/build.js - Static hosting
Other components
- Authors
- Readers
Connections 24
- Authors → Markdown posts: write
README.md - Authors → Post metadata: set metadata
README.md - Build orchestrator → Markdown posts: reads posts
README.md - Build orchestrator → Post template: loads template
README.md - Build orchestrator → Index template: loads template
README.md - Build orchestrator → Input validation: validates input
scripts/build.js - Build orchestrator → Content parsing: parses posts
scripts/build.js - Content parsing → Post rendering: renders Markdown
README.md - Post rendering → TOC generation: extracts headings
README.md - Build orchestrator → Post rendering: builds pages
scripts/build.js - Post rendering → Post template: fills placeholders
scripts/build.js - Post rendering → SEO metadata: adds post metadata
README.md - Build orchestrator → Homepage generation: builds homepage
README.md - Homepage generation → Index template: fills placeholders
scripts/build.js - Build orchestrator → Category pages: builds category pages
README.md - Build orchestrator → Sitemap generation: generates sitemap
README.md - Build orchestrator → Generated site: writes files
README.md - Post template → Generated site: renders into
README.md - Index template → Generated site: renders into
README.md - Theme preference → Readers: sets preference
README.md - Generated site → Static hosting: deploys
README.md - Static hosting → Readers: serves pages
README.md - Generated site → Responsive styling: includes assets
README.md - Generated site → Theme preference: includes script
README.md