Watch
1
0
Fork
You've already forked modeltrains.besthappypanda.com
0
The Model Railway Handbook — a free guide to building a model railway that actually runs. Static HTML, hand-drawn SVG diagrams, installs as an offline app. Served by bovine-pages-server at modeltrains.besthappypanda.com
  • HTML 80.5%
  • JavaScript 10.8%
  • CSS 8.1%
  • Shell 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adam 290bdf50f4 Link all four sites: Pack Bench is live
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.
2026-09-09 07:59:37 +01:00
public Link all four sites: Pack Bench is live 2026-09-09 07:59:37 +01:00
tools Link all four sites: Pack Bench is live 2026-09-09 07:59:37 +01:00
.gitignore The Model Railway Handbook: initial publish 2026-09-08 16:36:20 +01:00
.pages The Model Railway Handbook: initial publish 2026-09-08 16:36:20 +01:00
README.md The Model Railway Handbook: initial publish 2026-09-08 16:36:20 +01:00

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

  1. Bump the service worker cache after any asset edit. public/sw.js serves assets cache-first, so an edited stylesheet or script stays invisible to anyone with the app installed until var VERSION = "mrh-…" changes.
  2. The repo name must stay modeltrains.besthappypanda.com. Bovine verifies domain ownership against a DNS TXT record holding sha256("owner/repository"). Rename the repo and the custom domain silently 404s while the pages URL still returns 200.
  3. Re-registering the domain needs an explicit /index.html — the dots in the repo name make bovine read .com as 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.