Doc: An SSG on bun
-
Install Bun
-
Clone the repo:
git clone https://github.com/davidthewatson/doc.git cd doc
-
Install dependencies:
bun install
-
Setup your personal site.
My site lives in github pages currently, so I do
gh repo clone
and go from there.Your site may vary in storage. That's OK.
-
Create and save a .env file for your site. Mine looks like this:
export SITEROOT=~/github/davidthewatson.github.io export SRC=$SITEROOT/src export STATIC=$SITEROOT/static export DOCS=$SITEROOT/docs source .env
doc will slurp .env at run-time.
-
Run the build script:
bun run build
-
Examine the results for bugs. Lather, rinse, repeat.
Save-on-file-change trigger coming real soon now.
A Static Site Generator (SSG) makes markup from markdown.
doc uses:
GFM for syntax, Jinja for structure, and Pico for style.
I started working on CMS before Y2K.
This is postmodern: ~ 5 years, idea to proto with the hack fest cycle cms.
The real?
January 2025.
- My Python Static Jinja code was crufty, slow, legacy.
- Latency is lossy, from invention's mother to evil's root.
- Bun is fun! Efficiency, Utility, and Value at-once. Priceless.
- bun
- GitHub-Flavored Markdown (GFM)
- Jinja (includes) for structure
- Pico Cascading Style Sheets (CSS) for style
This project is licensed under the BSD 3-clause License - see the LICENSE file for details.
Copyright (c) 2025, David Watson