Repository navigation
Replace Zola with a std-only Rust generator, deployed by GitHub Pages actions - #14
Conversation
Four short notes back Plan 0002: an inventory of what the Zola site uses today, a design for a std-only Rust generator, Docker builds with an official-actions Pages deploy, and what to keep from the August plan.
A small plan of reviewable steps: pin the broken deploy action first, make content Markdown-only and drop Bulma while Zola still deploys, then build a std-only Rust workspace next to Zola and switch Pages over in one final step.
shalzz/zola-deploy-action@master now installs Zola 0.23.6, which stops at templates/macros.html:1 with "Unknown tag", so every PR build and the next deploy fail. Pin the action to v0.22.1 and actions/checkout to v7.0.1 by commit SHA, give each job only the token permissions it needs, and name Zola 0.22.1 in the README for local builds.
fix: pin the Zola deploy action to v0.22.1
Every step now lands as a reviewed PR on the fork's main, and the finished work goes upstream as one PR (new step 9), so Part B no longer waits for upstream's agreement. Mark step 1 as done and record the step 2 choices: resources as a Markdown list without the 3 empty subcategories, the entries of upstream PRs #3 and #9 ported with credit, and Zulip linked through /zulip/.
docs: add Plan 0002 and its research notes
Nine of the eleven content files now start with a YAML header (---) that uses only keys Zola and the planned generator both read. News posts list their authors in the page-level authors key instead of [extra] author, and the byline joins them with "and", so it reads as before. The news section gains a title. The resources and Zulip files follow in their own commits.
Zola already turns _ into - in URLs, so /news/call-for-participation/ and /news/campus-tour/ stay the same; the files now match them.
The 3-level TOML data becomes headings and a list item per resource
("[Title](url) — Author. Description."), so adding one is a one-line
edit with a GitHub preview. Headings get real ids, which the old #slug
links lacked, and the inline code in a description now renders. The
three empty subcategories (Macros, Networking, Web) are dropped, and
resources.html and macros.html are deleted. The intro note keeps its
text and links straight to the editor for this file.
Ported from upstream PR rust-edu#3, which added the entry to the TOML data this branch replaces. Co-authored-by: ZhangHanDong <27893+ZhangHanDong@users.noreply.github.com>
Ported from upstream PR rust-edu#9, which added the entry to the TOML data this branch replaces. Co-authored-by: Alexandru Radovici <2838177+alexandruradovici@users.noreply.github.com>
content/zulip.md becomes the section content/zulip/_index.md, because Zola only honours redirect_to on sections; Zola's built-in redirect replaces redirect.html. The menu and the home page link to /zulip/ instead of zulip.rust-edu.org, which answers with a redirect to plain http://, so the Zulip host lives in one file.
The announcement button (a div with Bulma classes and class="is", which matches no CSS rule) becomes a plain link, and the contact address a Markdown mailto link. content/ now holds no HTML tags.
Three links between pages resolved under the current page and 404ed live (cfp-2022.html, paper-format-latex/, code-of-conduct); they are now root-relative. The contact link used an email: scheme wrapped in <> and becomes a plain mailto link. Two http://rust-edu.org links point to / instead.
The GOALS list in the announcement switched from * to - for its last item, which splits it into two lists; it now uses * throughout. Two pages repeated the title as a second h1 in their content; those headings become h2 (their ids stay the same). Two invisible zero-width spaces inside a campus-tour quote are removed.
Without sort_by, Zola lists a section's pages in no set order; the live /news/ shows 2022, 2026, 2025. sort_by: date lists them newest first.
Zola turns a relative link such as proceedings.pdf into an absolute https://rust-edu.github.io/... URL, which costs a 301 to rust-edu.org. The five file links on the workshop pages are now root-relative, so all links between pages and files in content/ use the same form.
docs/editing.md maps each URL to its file and lists the header keys, the Markdown in use, the link forms that work on every page, the common changes (a news post, a resource, a menu link), proposing a change on github.com, and a local preview with Zola 0.22.1.
refactor: Markdown-only content
base_url was https://rust-edu.github.io, so the stylesheet, logo and every permalink went through a 301 to rust-edu.org, and sitemap.xml and robots.txt advertised the github.io host; it is now rust-edu.org. title and description sat under [link_checker], where Zola ignores them, and description gets the site's tagline. build_search_index (misplaced under [search], no search UI), render_emoji (no emoji codes in content), minify_html (the default) and stale comments go. Menu links end in /, which saves a redirect on GitHub Pages. The built pages are otherwise unchanged.
static/style.css (7.6 KB, served at the same /style.css) replaces the Sass build of Bulma and Bulmaswatch (429 KB, Bulma included twice, plus a runtime Google Fonts import). It holds every color in one token block with a dark theme by prefers-color-scheme, uses the system font stack, styles the HTML that Markdown produces without classes, links in brand green #0b7261 (underlined inside text), and meets WCAG 2.1 AA contrast in both themes. The logo is inverted in the dark theme, since its lettering is black. The templates drop the Bulma markup: a header, nav, main and footer with a skip link and visible focus; no JavaScript, so the mobile menu wraps instead of collapsing; no nested link around the logo, no target="_blank"; news dates use the same "Jul 11, 2022" format as the pages; and the content is no longer run through Markdown a second time. home.html (unused), sass/ and static/js/site.js are deleted.
Nothing uses ext/bulma or ext/bulmaswatch since style.css is plain CSS, so the submodules, .gitmodules and the checkout's submodules option go. A fresh clone builds with no extra step; the README and docs/editing.md lose the submodule step, the README its stale troubleshooting section (including a config snippet that was invalid TOML), and it now points to the editing guide and to where the layout and style live.
refactor: plain CSS, no Bulma, no submodules
A virtual workspace for the std-only site generator: resolver 3, edition 2024 and Rust 1.99.1, pinned in rust-toolchain.toml (minimal profile plus rustfmt and clippy) and as rust-version; publish = false, and license CC0-1.0 like the rest of the repository (plan decision 6). The workspace lints forbid unsafe code and warn on unwrap, expect, panic, todo, unimplemented, dbg!, printing to stdout, mod.rs files, glob imports and lossy casts; clippy.toml allows unwrap, expect and panic in tests. Cargo.lock is committed and lists no dependencies. crates/site is edu-site, with the edu binary (plan decision 5). It knows two commands so far, help and version; any other command line is a usage error that exits with status 2. Arguments are read with args_os, so one that is not valid Unicode is an error, not a panic. The other crates of the plan (edu-yaml, edu-markdown, edu-template) arrive with their first code.
The Dockerfile's check stage runs cargo fmt --check, clippy with
warnings denied, the tests and a release build, all --locked --offline
and with no network, in rust:1.99.1-slim-trixie pinned by digest. The
same command runs the checks on a laptop:
docker build --target check .
The .dockerignore is an allowlist, so .git, target/ and public/ never
reach the build.
ci.yml runs that build on pull requests and pushes to main with a
read-only token, after two guards: Cargo.lock lists no crate from a
registry or git, and the Dockerfile's FROM tag names the Rust version
of rust-toolchain.toml. The runner is ubuntu-latest, since the checks
run inside the pinned image. The README says how to run the checks;
Zola still builds and deploys the site.
Decisions 2 and 3 (links in brand green, no JavaScript) were applied in step 3; decisions 5 and 6 (the edu names, and CC0 for the code too) were taken on 2026-11-01 for step 4. Steps 0, 2 and 3 are marked done. Step 4 now adds each crate with its first code instead of creating four crates at once, empty ones included, so its done-when asks that Cargo.lock list only our own crates.
feat: generator workspace, edu command and Docker CI
The first half of the YAML subset of research 0002 §3: `key: value` maps, maps indented under `key:`, plain, single-quoted and double-quoted scalars, and comments. Every scalar stays a string for its consumer to type. Anything outside the subset (tabs, anchors, aliases, tags, flow collections, block scalars, values over several lines, `: ` in a plain value) is an error at a line and column, the column counted in characters. Lists, page headers and `edu check` follow in the next PR.
The YAML subset with its tests comes to about 690 lines, over the 600-line limit of a PR, so it lands in two halves where research 0002 §9 already split it: maps, scalars and errors first; lists, page headers and `edu check` next. Part B grows to about 4,850 lines in about twelve PRs.
feat: edu-yaml, the YAML subset's maps, scalars and errors
…live is not FROM check A crate copied into crates/ has no source line in Cargo.lock, so the old guard let it pass. The new step also checks that the lock lists exactly edu-markdown, edu-site, edu-template and edu-yaml. A second step checks that the Dockerfile keeps FROM check AS live, which is the only check of main since ci.yml runs on pull requests only. Both close gaps named in research/0005 (sections 3.3 and 3.7).
ci: fail when Cargo.lock lists a crate but the four edu-* crates, or live is not FROM check
chore: merge upstream main after Zola 0.23 fix (rust-edu#15)
feat: replace urls.txt with urls.yaml, add themed 404.html layout, and tighten workspace config
Add `target="_blank" rel="external noopener"` at build time to `<a>` elements pointing to `https://` or `http://` URLs as well as site paths that forward to external URLs (such as `/zulip/`), while keeping internal links, `#` anchors, `mailto:` links, redirect fallback pages, and Atom/RSS XML feeds unchanged.
`edu build` now writes `/llms.txt` beside `robots.txt` and `sitemap.xml`, in the Markdown that llmstxt.org proposes: the `title` of `site.yaml` as its heading (the base URL without one), its `description` as a quote, a link to each page by URL, a link to each post, newest first, with its day and authors, and the two feeds under `## Optional`, since they hold the whole text of every post. It leaves out the redirects and the drafts, so a preview shows the live file at its own address. Markdown syntax in titles, names and the description is escaped. `/llms.txt` joins `keep` in `urls.yaml`, and `static/llms.txt` is now reserved, as `static/robots.txt` is.
The plan proposes a fifth crate, edu-minify, on the standard library alone. It publishes the stylesheet without its comments, its indentation and its empty lines, and three lines of one layout take the comments out of the two inline scripts. At 2bd9da3 the stylesheet goes from 5,924 to 3,438 B with gzip, and a first visit to the largest text page from 1.07 KB over the 15 KB of Plan 0003 to 1.54 KB under. The plan also sizes a scan that takes the indentation out of the HTML of the layouts, and leaves that part to its decision 1. The figures for its steps come from two prototypes that are not in the repository. Nothing is decided: the status is "proposed", and the ten decisions are open. Plan 0003 lists minified CSS or HTML under "Not in this plan"; a dated note there now points to this plan.
…t Books The two suggestions of rust-edu#5: a link to the Little Book of Rust Books, under "Collected learning materials", and a new section "University courses" of eleven courses that universities teach, or have taught, in Rust, each with its public page. Embedded Rust 101 moves there from "Teaching and Training", unchanged. Refs rust-edu#5
content(resources): add university courses and the Little Book of Rust Books
luckymachi
left a comment
There was a problem hiding this comment.
All changes look good and on the provisional site there are no issues present. I think any security-related checks would be good to do once deployed to check if the CI is leaking anything important, but all good for the initial version!
… what CI runs The three guards (only our crates in Cargo.lock, the live stage FROM check, one Rust version) were shell inside ci.yml, so `make ci` did not run them and a change could pass locally and fail on GitHub. They are now the `guards` target, which `make check` and `make ci` run first, and CI runs `make ci` and `make preview`. A guard prints its error as `file:line:col: error: …`, like `edu check`, and the filter that stays in ci.yml turns both into annotations. The list of crates is one variable, `CRATES`, which also gives the count and the message. `make ci` no longer keeps the image of the check stage (`--output type=cacheonly`, as CI already did).
The comments are inside the step: above set -o pipefail, above the pipe, and above each command of sed, with one line of the build and the command it becomes as an example.
ci: move the checks of ci.yml into the Makefile, so that make ci runs what CI runs
BartMassey
left a comment
There was a problem hiding this comment.
I'm happy to take this commit — thanks so much for doing all this work!
There's a couple things I'd still like to see in the near future:
-
Split out the custom CMS into its own crate. That would let other people use and adapt it, and more importantly would split CMS changes from content changes in the repo. If it were my repo, I'd archive this main branch under another name and then rewrite history to look as if the CMS was separate from the content to begin with. We can provide a
rust-edurepo for the CMS. -
Clean up the AI documentation a bit and isolate it so that it's clear what is intended for humans and what is intended for the AI.
We can post these as separate issues against the repo once it's merged. @kenesparta tell us what you think, and merge when ready.
|
@BartMassey |
The description of #14 credits Antigravity (Google DeepMind) with the white lettering and page-colored hover of the feed buttons, urls.yaml and the 404 page, and the acknowledgement in the repository left it out.
… and a PR template (#19) * docs: separate the docs for people, for AI agents and the design notes Each file now says who it is for, and the three kinds no longer share a folder (#18). For people: the README gets a table of what to read, the map of the repository and the commands, which were only in AGENTS.md, and the rules of the build. Its section on the generator moves, as it was, to docs/generator.md, with the rules of a change to the generator. The Makefile no longer sends a person to AGENTS.md. For AI coding agents: AGENTS.md says at its top that it is for agents, drops the two tables that repeated the README, and keeps each rule in short. CLAUDE.md moves to .claude/CLAUDE.md, so the root holds one file for agents. docs/ai.md is the page for people about AI: the acknowledgement, what is asked in a pull request, the files for the tools, and /llms.txt, which leaves docs/editing.md. Design notes: the plans and the research notes move to docs/design/, with an index that says they are a record and not a guide, and which of them go with the generator in #17. No page, layout, style or line of Rust changes, and the built site is the same. * docs: name Antigravity in the AI acknowledgement The description of #14 credits Antigravity (Google DeepMind) with the white lettering and page-colored hover of the feed buttons, urls.yaml and the 404 page, and the acknowledgement in the repository left it out. * docs: add a guide to a news post and a template for pull requests docs/new-post.md goes from an empty file to a merged post in four steps, for a person who writes one, and ends with the rules that let an AI assistant write one from the same page. Its link opens GitHub's editor on a new file in content/news/ with the header in place; the date of that header is left to fill in, and the check stops until it is. The whole post that the guide shows passes `edu check`. .github/pull_request_template.md starts the description of each pull request with three headings, for a person and for an agent: what changes, the checks, and which AI tools helped. The README, docs/editing.md, docs/ai.md and AGENTS.md point to both. * docs: isolate AI docs under docs/ai/ and separate LLM from human guides - Split the news-post assistant prompt and rules out of docs/new-post.md into a dedicated LLM specification at docs/ai/new-post.md, keeping docs/new-post.md purely for human authors. - Move docs/ai.md to docs/ai/README.md so top-level docs/ holds only human contributor guides alongside docs/design/ and docs/ai/. - Make AGENTS.md self-contained for coding agents (repo map, commands, frontmatter keys, file allowlists and YAML/Markdown parser rules) without requiring agents to read human tutorials first, and note in docs/ai/README.md and docs/design/README.md that its Generator section moves with crates/ in #17. - Keep README.md's top navigation table and .github/pull_request_template.md purely human-voiced, isolating AI in README.md to the bottom AI Acknowledgement section. - Clarify ASCII-only page slugs (a-z, 0-9, single -) and YAML quoting for ` #` comments and leading indicator punctuation in both guides.
The site moves from Zola to its own small generator, written in Rust with only the standard library, and GitHub Pages publishes it with GitHub's own actions. Every page stays one Markdown file under
content/, now with a short YAML header, and keeps its address.#15 fixed the Zola deploy on
mainfirst, so the site can post news, such as a notice of this change, while this PR is in review. Zola 0.23.6 had stopped attemplates/macros.html:1(Unknown tag), so no push tomaincould deploy. #15 drops the macro and pins the Zola action to 0.23.6, and its deploy onmainis green. This PR then removes Zola:main.yml,config.tomlandtemplates/go, anddeploy.ymltakes their place.The result is live on the fork's Pages site, built from this PR's head by its
deploy.yml: https://kenesparta.github.io/rust-edu.github.io/ The two new feeds of the news are there too: https://kenesparta.github.io/rust-edu.github.io/atom.xml and https://kenesparta.github.io/rust-edu.github.io/rss.xml.For people who edit the site
title, plusdateandauthorsfor a news post.docs/editing.mdsays where each page lives and lists the keys.site.yaml.urls.yamlstill exist. An error shows on its line under Files changed, and the check attaches the built site, drafts included, as the artifactsite-preview.docker compose up, then http://127.0.0.1:1111. A reload builds the site again, or shows the error of the check.What changes on the site
static/style.cssof 22.0 KB replaces the 429 KB of Bulma and Sass. It has a light and a dark theme, WCAG AA contrast, a skip link and a visible focus. A button at the end of the menu switches between the two themes: it shows a sun in the light theme and a moon in the dark one. Its two short inline scripts are the site's only JavaScript: without JavaScript the button stays hidden, and the page follows the system's theme. The menu wraps on small screens. The header stays at the top of the screen while the page moves under it, blurred behind the bar./atom.xmland RSS 2.0 at/rss.xml, with the same posts, each with its whole text. Every page names both for feed readers, the Atom feed first, and ends its menu with an orange button for each feed. On a narrow screen one button with the feed symbol takes their place and opens a short menu with both, with no script./news/links to both too. rust-edu.org has had no feed so far. Research 0006 records each choice and its checks./js/site.js, the script of the old menu.urls.yamllists these 26 addresses, the two feeds and/llms.txt, and the check fails when one of them goes away./zulip/still redirects to the Zulip chat, now by a line ofurls.yaml, and the menu and the home page link to it./zulip/, opens in a new tab.rustcerror, and four links, to the resources, the news, the workshop and the Zulip chat./llms.txtgives the site in brief to language models, in the format of https://llmstxt.org/: its pages, its news posts and its feeds. The build writes it from the pages, as it writes the feeds.email:link are fixed. The news list is sorted newest first, and the three empty subcategories of the resources page are gone.The generator
crates/holds a Cargo workspace of four crates, andCargo.locklists only those:edu-yaml,edu-markdown,edu-templateandedu-site, which builds the binaryedu. They have 10,099 lines of Rust, tests included.edu checkchecks the site,edu buildwrites it intopublic/, andedu serveserves it locally.file:line:coland a hint, never a guess.javascript:address or HTML, and at a symbolic link.Cargo.locklists any crate but these four, and when theDockerfilestage that publishes the site no longer builds on the one that runs the checks. These checks are targets of theMakefile, somake ciruns on a laptop what CI runs on a pull request.layouts/. A change of layout or style needs no Rust.research/record the decisions. The README documents the build, the check, the preview and the deploy.AI acknowledgement
I made this with Claude Code, Anthropic's coding agent, using the Claude Opus 5.5 model since 2026-10-28. Claude Code wrote most of the generator's code and tests, the layouts and the stylesheet, the docs, the research notes, the commit messages and this description, and it drafted Plan 0002 from goals and decisions I set. It also did the checks that the pull requests report: the comparisons with what Zola 0.22.1 deployed, the security review behind kenesparta#30 to kenesparta#32, the mutation tests, and the checks of the feeds with the W3C Feed Validation Service, feedparser and FreshRSS. I wrote three commits myself: 068bfca, the
Openenum inedu-template, in kenesparta#15; and 2f012d3, the README's "How it works", and 8d5d63b, which moved template parsing intocrates/template/src/parse.rs, both in kenesparta#17. Each change was its own pull request on my fork (kenesparta#2 to kenesparta#35, kenesparta#37 to kenesparta#47, kenesparta#49 to kenesparta#60, and kenesparta#62 to kenesparta#68), with green CI, and I read each one before it was merged. My feedback went into the sessions or into my own commits, so those pull requests have no review comments. The changes to the logo and the tab icon in kenesparta#37, the update of the feeds' research note in kenesparta#50, the theme button's icons and the feed button in kenesparta#51, the header that stays at the top in kenesparta#52, the menu of the feeds in kenesparta#53, the fix of a mistake of that change in kenesparta#54, the feeds' orange buttons in kenesparta#55, their colors in kenesparta#56, the home page's hero in kenesparta#57, Plan 0004 in kenesparta#65, the move of CI's checks into theMakefilein kenesparta#68, and two updates of this description were made with Claude Code using the Claude Fable 5.2 model. The white lettering and page-colored hover of the feed buttons in kenesparta#58, the merge of upstreammainin kenesparta#62,urls.yamland the 404 page in kenesparta#63, and one update of this description, were made with Antigravity (Google DeepMind). The August plan that Plan 0002 replaces (tagarchive/initial-project-planon my fork) was drafted with Claude Fable 5. I used Gemini CLI only for reviews and questions: none of the committed code or docs is its output.AGENTS.mdholds the instructions that the agents followed.How to review
These are 117 commits from 63 pull requests, each merged into
mainof the fork (kenesparta#2 to kenesparta#35, kenesparta#37 to kenesparta#47, kenesparta#49 to kenesparta#60, and kenesparta#63 to kenesparta#68). kenesparta#30 to kenesparta#32 come from a review of the security of the generator and of how easy it is to add a news post, kenesparta#33 addsAGENTS.mdand aMakefile, and kenesparta#34, kenesparta#35 and kenesparta#37 give the site a new look. Merging with a merge commit keeps them as they were merged on the fork. All the actions are GitHub's own and pinned by commit SHA. Dependabot proposes updates of the actions weekly. It also proposes updates of the Rust image together withrust-toolchain.toml, in one pull request.The newest twenty-eight, kenesparta#38 to kenesparta#47, kenesparta#49 to kenesparta#60 and kenesparta#63 to kenesparta#68, joined this PR between 2026-11-10 and 2026-11-16:
/atom.xmland/rss.xml. Given the address of each feed on the fork's Pages site, the W3C Feed Validation Service finds both valid, with no warning.urls.txtwithurls.yaml, which also holds the addresses that redirect, such as/zulip/, and gives the 404 page the look of the site./llms.txt, and content(resources): add university courses and the Little Book of Rust Books kenesparta/rust-edu.github.io#67 adds the two suggestions of Create a full set of recommended resources #5 to the resources page.ci.ymlinto theMakefile, so thatmake ciruns on a laptop what CI runs on a pull request.ci.ymlkeeps what belongs to GitHub: when the checks run, what they may read, the errors shown on the lines of a pull request, and the preview as a download.maininto the fork after fix: support Zola 0.23 and pin the deploy workflow actions #15. It changed no file of the fork, and it is why this PR has no conflict withmain.Dockerfileskips the checks, add the AI acknowledgement to the README, record the theme button's scripts in Plan 0002, and add Plan 0003 and the research notes on CI caching and the feeds.Checklist for the admin who merges
deploy.ymlneeds one setting that an admin or a maintainer (GitHub's Maintain role) can change, and a second one, which only an admin can change, keeps other branches from deploying:rust-edu.orgfor it: organization settings → Pages → Add a domain, then a TXT record at the DNS host, as GitHub shows it, then Verify. The record can take up to 24 hours to show. Then nobody else can claim the domain if it is unlinked for a moment during the switch.rust-edu.org, and Enforce HTTPS stays on.main. The environment dates from the Zola deploys and allows every branch today, anddeploy.ymlcan also be run by hand on any branch. On the fork, where Pages started with GitHub Actions, GitHub set this rule itself.https://rust-edu.org/style.cssis about 22 KB instead of 429 KB,https://rust-edu.org/zulip/still redirects to the chat, andhttps://rust-edu.org/atom.xmlandhttps://rust-edu.org/rss.xmllist the three news posts..github/dependabot.ymlwas checked.Rollback
gh-pages,/ (root). Pages then serves the last Zola build, whichgh-pagesstill holds. The branch stays for two weeks after the merge.git revert -m 1on its merge commit, and push the revert tomain. It brings back themain.ymlof fix: support Zola 0.23 and pin the deploy workflow actions #15, which builds each push tomainwith Zola 0.23.6 and deploys it togh-pages, and it removesdeploy.yml.The first step alone puts the old site back. The second makes the next pushes to
mainpublish with Zola again. Without the first, Pages keeps serving the last deploy ofdeploy.yml, not what Zola writes togh-pages.