- HTML 80.5%
- JavaScript 10.8%
- CSS 8.1%
- Shell 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Every sibling now has a domain, so the sync script rewrites all of them to their real URLs instead of dropping the ones with nowhere to point. |
||
| public | ||
| tools | ||
| .gitignore | ||
| .pages | ||
| README.md | ||
The Model Railway Handbook
A free, opinionated guide to building a model railway that actually runs: the geometry, the electrics, the mechanisms and the landscape. Static HTML — no build step, no framework, no dependencies. Installs as an offline app.
Live at https://modeltrains.besthappypanda.com
Layout
.pages bovine-pages-server config (enables the site, sets the domain)
public/ everything that gets served
tools/ helper scripts, not published
Bovine serves the contents of public/ — nothing above it is web-visible.
Deployment
The dev folder is ~/Documents/knitting site/model-trains, which sits inside a
working tree holding three unrelated sites, so this repo is kept separate and
public/ is rebuilt from it:
sh tools/sync-from-dev.sh
git add -A && git commit -m "Update site" && git push
Pushing to main is the deploy — bovine reads the default branch directly,
there is no build step.
Things that fail silently
- Bump the service worker cache after any asset edit.
public/sw.jsserves assets cache-first, so an edited stylesheet or script stays invisible to anyone with the app installed untilvar VERSION = "mrh-…"changes. - The repo name must stay
modeltrains.besthappypanda.com. Bovine verifies domain ownership against a DNS TXT record holdingsha256("owner/repository"). Rename the repo and the custom domain silently 404s while the pages URL still returns 200. - Re-registering the domain needs an explicit
/index.html— the dots in the repo name make bovine read.comas a file extension, so the bare directory path 404s.
What is in the site
Eleven pages: the handbook itself (scales, track and plans, locomotives, power and DCC, benchwork and scenery, a reference desk), a repair bay that matches a described fault to its fix, a design bench with a sketch pad that exports STL, and an install page. Every diagram is hand-written SVG inside the page.