timescale.info
Sign inSign up

How OpenChronology was built

Every merged pull request of openchronology/timeline-app, its first week of commits and its releases; and before them the 2020 PureScript editor, from snapshots of its deleted repositories in the Wayback Machine. Written to this server through the HTTP API.

327 moments · 2020-03-09T00:15:08Z CE – 2026-11-02T20:11:21Z CE · by @athan · @athan

#380 · Landing page and per-audience pages, behind LANDING_PAGE (#379)

  • timeline-app
  • pull request

Fixes #379 A landing page at `/` and pages for six audiences at `/for/ `, behind `LANDING_PAGE` (off by default; `1`, `true` or `yes` turns it on). **Switch** - Off: `/` is the timeline browser, as before. `/explore` serves the same browser and its canonical link points to `/`. `/for` returns 404. - On: `/` is the landing page and `/explore` is the browser, with each list's query and its in-place search. The header gets an **Explore** link and the account menu gets **Your timelines**; signing in with no page to return to lands on `/explore`. **Pages** - Educators, researchers, investigators, operations, writers and developers, plus an index at `/for`. Unknown audiences return 404. - The copy is Markdown in `platform/content/landing/`. An operator can replace any file from `LANDING_CONTENT_DIR`. - Every claim in the copy was checked against `docs/`. **Settings** - `LANDING_EXAMPLES[_ ]` takes `owner/slug` timelines and shows them as the browser's cards. Private, labelled and missing timelines, and timelines whose owner is suspended, are skipped silently. If none are set, the page shows the browser's first public timelines, featured first. - `LANDING_VIDEO[_ ]` takes a YouTube URL. The page shows a link until someone clicks it, then loads the youtube-nocookie player. The CSP's `frame-src` allows that origin only on `/` and `/for/*`, and only when a video is set. - The settings are documented in `openchronology.env`, `.env.example`, `compose.yml`, `docs/administration.md#landing-page` and `docs/docker.md`. **Search** - When the switch is on, `pages.xml` lists `/explore`, `/for` and each audience page. - Each page has a title, a description, a canonical link, OpenGraph tags and `WebPage` JSON-LD (`CollectionPage` for the index). **Layout:** works without JavaScript, at phone width and in light and dark mode. The dark scheme applies only to these pages, because the rest of the site has none yet. **Other:** `for` is now a reserved username. An existing account with that name keeps its profile at `/users/for`. **Tests** - `test/landing.test.mjs`: unit tests. - `test/landing-live-postgres.mjs` (added to CI): both settings of the switch for `/`, `/explore` and the sitemap; every audience page; unknown → 404; examples; the content override; CSP; and a browser check at phone and desktop width in light and dark, with and without JavaScript, including the video. - `next-postgres`, `timeline-browser-live`, `sharing-postgres` and `next-platform` also pass locally.

Sources

Open #380 · Landing page and per-audience pages, behind LANDING_PAGE (#379) in the timeline