Building and Deploying
Contents
Build
go run ./cmd/generate
Reads notes/ and writes the whole site to .dist/:
/notes/<slug>/index.html– one page per note/graph-data.json– nodes and edges for the Graph/static/– a verbatim copy ofnotes/(this is how slide decks and other note-adjacent files get served)/js/and/assets/– widgets and styles/all-notes.txt– every note concatenated into one text file
Unresolved id: links are reported as warnings during the build, so
watch the output.
Preview locally
go run ./cmd/devserver
Serves .dist/ at http://localhost:8080. It's a plain file server –
rerun the generator to pick up changes.
There's also a Docker setup (Dockerfile, docker-compose.yml); see
DOCKER.md in the repo root.
Deploy
Pushing to main triggers the GitHub Actions workflow
(.github/workflows/deploy.yaml): it runs the generator and
force-pushes .dist/ to the gh-pages branch, which serves the site
at brain.dustinfirebaugh.com (the CNAME file is written at build
time).