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
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ jobs:
python -m pip install -r site/requirements.txt

- name: Build site
# The home page reads the newest releases through gh; a failed call fails the build.
env:
GH_TOKEN: ${{ github.token }}
Comment thread
ricardofrantz marked this conversation as resolved.
Resolved
run: python site/build.py

- name: Make the release files
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: site

# Build the specimen site (site/build.py) and deploy it to GitHub Pages.
# Build the specimen site (site/build.py) and deploy it to GitHub Pages. A pull request that
# touches the site builds and checks it too, with the same token, but does not deploy.
# Pages source must be "GitHub Actions" (repo settings).

on:
push:
branches: [main]
pull_request:
paths:
- "site/**"
- "fonts/**"
- ".github/workflows/site.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages
group: ${{ github.event_name == 'pull_request' && format('site-pr-{0}', github.ref) || 'pages' }}
cancel-in-progress: false

jobs:
Expand Down Expand Up @@ -41,6 +47,9 @@ jobs:
# it stops with an error when a file is missing, so the deploy fails
# and the live site stays as it is.
- name: Build site
# The home page reads the newest releases through gh; a failed call fails the build.
env:
GH_TOKEN: ${{ github.token }}
run: python site/build.py

- name: Check the built site
Expand All @@ -50,21 +59,24 @@ jobs:
fonts/warp/MachineMadeWarp-Regular.woff2 fonts/warp/MachineMadeWarp-Italic.woff2 \
fonts/warp/MachineMadeWarp-Bold.woff2 fonts/warp/MachineMadeWarp-BoldItalic.woff2 \
fonts/warp/MachineMadeWarpDisplay-Regular.woff2 fonts/warp/MachineMadeWarpDisplay-Italic.woff2 \
data/readability.json data/heddle.json data/warp.json index.html weft/index.html heddle/index.html \
warp/index.html; do
data/readability.json data/heddle.json data/warp.json index.html 404.html weft/index.html heddle/index.html \
warp/index.html fonts/home/weft.woff2 fonts/home/heddle.woff2 og.jpg; do
test -s "site/_site/$f" || { echo "::error::site/_site/$f is missing."; exit 1; }
done
python -c 'import json,sys; r=json.load(open("site/_site/data/readability.json")); sys.exit(0 if r.get("rows") else 1)'

- name: Configure Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Upload Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site/_site

deploy:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 10
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,15 @@ Site (from the repository root):

```sh
python -m pip install -r site/requirements.txt
python site/build.py # site/_site/
python site/build.py # site/_site/; reads the newest releases through gh (set GH_TOKEN)
uv run --with playwright==1.65.1 playwright install chromium # once, or pass --chrome PATH
uv run --with playwright==1.65.1 python3 site/shots.py --axe axe.min.js # browser check, by hand
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
```

The home page and the 404 page follow the design system of the four
machine-made sites. `site/assets/system.css` is copied unchanged from
machine-made/machine-made.github.io; its first line names the commit.

## Repository layout

| Path | Content |
Expand Down
2 changes: 1 addition & 1 deletion site/assets/heddle.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
var grid = el("div", { "class": "glyph-grid", role: "group", "aria-labelledby": hid });
grp.chars.forEach(function (c) {
var b = el("button", { type: "button", "aria-pressed": "false",
"aria-label": (c.n || hex(c.u)) + ", " + hex(c.u), title: hex(c.u) + " " + c.n },
"aria-label": String.fromCodePoint(c.u) + ", " + (c.n || hex(c.u)) + ", " + hex(c.u), title: hex(c.u) + " " + c.n },
String.fromCodePoint(c.u));
b.addEventListener("click", function () { show(b, c); });
grid.appendChild(b);
Expand Down
208 changes: 61 additions & 147 deletions site/assets/site.css

Large diffs are not rendered by default.

224 changes: 224 additions & 0 deletions site/assets/system.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site/assets/warp.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
var grid = el("div", { "class": "glyph-grid", role: "group", "aria-labelledby": hid });
grp.chars.forEach(function (c) {
var b = el("button", { type: "button", "aria-pressed": "false",
"aria-label": (c.n || hex(c.u)) + ", " + hex(c.u), title: hex(c.u) + " " + c.n },
"aria-label": String.fromCodePoint(c.u) + ", " + (c.n || hex(c.u)) + ", " + hex(c.u), title: hex(c.u) + " " + c.n },
String.fromCodePoint(c.u));
b.addEventListener("click", function () { show(b, c); });
grid.appendChild(b);
Expand Down
2 changes: 1 addition & 1 deletion site/assets/weft.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
var grid = el("div", { "class": "glyph-grid", role: "group", "aria-labelledby": hid });
grp.chars.forEach(function (c) {
var b = el("button", { type: "button", "aria-pressed": "false",
"aria-label": (c.n || hex(c.u)) + ", " + hex(c.u), title: hex(c.u) + " " + c.n },
"aria-label": String.fromCodePoint(c.u) + ", " + (c.n || hex(c.u)) + ", " + hex(c.u), title: hex(c.u) + " " + c.n },
String.fromCodePoint(c.u));
b.addEventListener("click", function () { show(b, c); });
grid.appendChild(b);
Expand Down
Loading
Loading