Developer Guide
Running this site on your own machine to work on it. Deploying a copy instead? See the Install Guide.
Requirements
- Python 3 (any recent version — only the standard library is used)
- Git, to clone the repo
No build tooling, no dependencies to install for the site
itself — this is a plain HTML/CSS/JS site. (The tests/
folder uses Node's built-in test runner if you're working on
changelogs.js/versions.js/releases.js —
node --test, no install needed there either.)
1. Clone alongside the Engine
dev-server.py reads Engine content from a sibling
checkout next to this one, so local edits show up here without
pushing first:
git clone https://github.com/TS4RLS/Engine.git
git clone https://github.com/TS4RLS/Website.git
cd Website
Projects/
Engine/
Website/ <- run dev-server.py from here
Only cloning Website still works —
versions.js/changelogs.js just fall
back to fetching from GitHub for anything that doesn't have a
local sibling.
2. Run the dev server
./dev-server.sh [port] # macOS/Linux
dev-server.bat [port] # Windows
Defaults to port 8000. This serves the site the way GitHub
Pages does and forces dev mode on by default, which writes
dev-config.js (gitignored, never deployed) so
changelogs.js/versions.js load Engine
content from ../Engine instead of GitHub, and
reveals an amber "Development Mode" banner at the top of every
page so it's never ambiguous whether you're looking at the local
build or the live site.
--no-dev-mode— fetch from GitHub instead, matching production, to test production behavior locally
Prefer a plain static server with no dev-mode behavior?
python -m http.server 8000 works too — version/
changelog content will just always come from GitHub, same as
production.
3. Verify it's working
- Visit
http://127.0.0.1:8000— you should see the amber "Development Mode" banner across the top of the page, and the same info as a console log:[TS4RLS dev mode] Engine/Website content is loaded from local sibling checkouts, not GitHub. - Visit
/engine.html— the version badge should match your local../Engine/VERSION.md, not whatever's currently on GitHub. - Visit
/changelogs.html— the Engine tab should render your local../Engine/CHANGELOG.md.
Troubleshooting
- "Python 3 is required to run dev-server.py".
Install Python 3, make sure
python3(orpython) is onPATH. - Engine content 404s or falls back to GitHub.
../Engineisn't checked out next toWebsite/— the server logs a note at startup naming the missing folder. - Version badges don't match your local Engine/
Website checkouts. Make sure
dev-config.jsexists (dev mode is on) and hard-refresh —versions.jsfetchesVERSION.mdfresh each load, no caching involved. dev-server.batfails with "The system cannot find the batch label specified". The.batfile has LF-only line endings instead of CRLF (breakscmd.exe'sGOTO/label parser) — re-save it with CRLF, e.g.unix2dos dev-server.bat, or re-clone.