This site
Most academic websites are a CV with pictures. The problem with that is drift: the moment a number is typed into a page it stops being the number in the analysis. This one was built so that cannot happen — the page asks the workbook, at build time and again in the reader’s browser.
The idea
A project page carries perhaps fifty numbers — cohort sizes, rates, risk ratios, confidence intervals. Every one of them exists already, in a cell of the workbook where the analysis was done. Copying them into HTML creates a second copy that is correct exactly once, on the day it is pasted.
So no number on this site is typed. Each is written as a span that names the row it comes from. At build time the generator fetches the sheet and fills them in; when the page loads, a small script fetches the same sheet again and overwrites what it finds. The page is right before any JavaScript runs, and right again a minute after the spreadsheet changes.
How it is put together
- One config, one generator. Every project is a dictionary in
projects.py;build_site.pyturns the lot into pages. 2,746 lines of config, 7,143 of Python in all, no framework. - Live numbers.
sheet_live.pyreads any workbook in the shared layout and generates the browser-side refresher for it, so the build and the page cannot disagree about what a number means. - Encrypted downloads. Unpublished manuscripts and abstracts sit behind a passphrase — PBKDF2-SHA256 at 250,000 iterations, then AES-256-CBC, decrypted in the browser. 26 gated files; the server never holds a key.
- Figures from the data. Generators read the live sheet and write to each project’s own folder, on one shared palette.
- No database, no CMS, no build server. Static files on GitHub Pages. The whole site is a folder.
Why it is built this way
The honest reason is that I kept finding stale numbers. A figure would be regenerated, a workbook corrected after a reviewer’s comment, and the page would quietly keep the old value. Making the page ask the workbook every time is the only version of this that stays true without discipline.
The second reason is that a reader should be able to check. Every page says which workbook and which sheet a number came from, and the derivation diagrams name the query behind each cohort. That is a weaker claim than reproducibility, but it is a real one, and most sites of this kind do not make it.
What comes next
A drift check that fails the build when a page’s baked value and its workbook disagree by more than rounding — so a stale number stops being a thing a reader might notice first.