Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Validates and builds every pull request, so a mistake shows up on the change
# that caused it rather than after it reaches main.
#
# It builds as well as validates because validate.js checks metadata and file
# relationships without executing components — a post body reading a document
# that no longer exists passes validation and then dies during prerendering.
# Compile errors and bad imports are the same class.
#
# Nothing is published from here; see deploy.yml.

name: Check

on:
pull_request:
# Lets you re-run the checks by hand from the Actions tab.
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

# ci rather than install: installs exactly what package-lock.json records,
# so a dependency publishing a new compatible version can't change the
# result between runs of identical code.
- run: npm ci

# Warnings do not fail this. They describe unfinished work — a chart not
# yet exported, an image not yet quantised — which shouldn't block a
# branch. They print in the log; --strict is available if that changes.
- run: npm run validate

- run: npm run build
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Builds the site and publishes it to GitHub Pages.
#
# build/ is gitignored and never committed. This workflow builds it on a runner,
# uploads it as a Pages artifact, and Pages serves that — GitHub's documentation:
# "Pages serves uploaded artifacts rather than reading directly from the
# repository." So the built files never become git objects.
#
# Requires Settings -> Pages -> Source set to "GitHub Actions", not "Deploy from
# a branch". Without that, this runs and publishes nothing.

name: Deploy

on:
push:
branches: [main]
# Editing notes shouldn't redeploy the site.
paths-ignore:
- 'notes/**'
- '**.md'
workflow_dispatch:

# What the workflow is allowed to do. id-token is required by deploy-pages.
permissions:
contents: read
pages: write
id-token: write

# Two quick pushes shouldn't race to publish; the later one wins.
concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- run: npm ci

# npm run build is validate.js, then vite build, then strip-css.js. A
# validation error exits non-zero, so the build stops, so the deploy job
# below never runs and whatever is already published stays online.
- run: npm run build

- uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local_data
node_modules
build
notes
.ipynb_checkpoints
.claude
.DS_Store
.vscode
.svelte-kit
.env
.env.*
!.env.example
!.env.test
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License

By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License").

You can read the full license text at:
https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode

Summary (not a substitute for the full license):

You are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material

Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NonCommercial — You may not use the material for commercial purposes.
- ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
3 changes: 0 additions & 3 deletions ggh-transport-geography/index.html

This file was deleted.

3 changes: 0 additions & 3 deletions index.html

This file was deleted.

20 changes: 20 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"moduleResolution": "bundler"
},
"include": [
".svelte-kit/ambient.d.ts",
".svelte-kit/non-ambient.d.ts",
".svelte-kit/types/**/$types.d.ts",
"vite.config.js",
"svelte.config.js",
"src/**/*.js",
"src/**/*.svelte",
"posts/**/*.js",
"posts/**/*.svelte",
"scripts/**/*.js"
]
}
Loading
Loading