Skip to content

feat(docs): slug every session notes page, and the three route fixes that follow - #414

Open
IanoNjuguna wants to merge 5 commits into
IntersectMBO:fix/session-notes-typofrom
IanoNjuguna:fix/session-generator-slug
Open

IanoNjuguna wants to merge 5 commits into
IntersectMBO:fix/session-notes-typofrom
IanoNjuguna:fix/session-generator-slug

Conversation

@IanoNjuguna

@IanoNjuguna IanoNjuguna commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Four layers of the session-route work, collapsed into one PR because they are one mechanical unit: a reviewer cannot read the folder lowercasing without the slugs that go with it, and the generator change is only safe once every page carries a slug. Five commits, 29 files.

The archive served two URL shapes depending on whether a notes page happened to carry a frontmatter slug. This makes the slug universal and then fixes the three things that were wrong around it.

1. Slugs on the nine pages that lacked one. 14 of the 23 session-notes pages had a slug; the other 9 fell back to the folder path, which strips the numeric prefix and keeps the literal sessions segment.

Quarter Folder
q1-2026 09-community-builder-story, 11-open-source-docs, 12-cardano-developer-pathway
q4-2025 01-kickoff-orientation, 02-dev-opportunities, 03-dev-environment-setup, 04-essential-links, 06-repo-walkthrough
q1-2026 10-wallet-integration/session-1

The ninth is 10-wallet-integration, whose Session-2 sibling already holds the clean route for that session, so Session-1 takes /session-1/ rather than the two swapping. Swapping would break a live URL to fix an asymmetry nobody sees.

2. Six slugs that said the wrong quarter. 07-contributing-intersect and 08-open-clinic-1 sit inside q1-2026 and their slugs said q1-2025.

3. Four folders that broke the naming convention. 14-CIP-68 NFT-Standard (capitals and a space), its Recording, 13-smart-contracts-languages/Recording, and Session-1/Session-2 under the wallet session. Two of those renames change no URL because their pages already carry lowercase slugs.

4. The generator no longer guesses. scripts/generate-sessions.js derived a route from the file path whenever a slug was missing, replicating Docusaurus's number-prefix parsing by hand. That is the bug class this work exists for. The fallback is deleted: a page without a slug now fails the prebuild by name.

CONTRIBUTING.md gains a Session notes pages section stating what the build now enforces: slug required, its shape, lowercase-hyphenated folders, how a multi-part session nests, and that a moved page adds its old route to the redirect array in the same change.

Redirects: every route that moved keeps its old URL through @docusaurus/plugin-client-redirects. The sesion-notes redirect from #410 now points straight at the slug route, so no chain is two hops.

Refs #375. Stacked on #410. Replaces #411, #412, #413 and this PR's own earlier scope, which were four layers of the same change.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing

  • I have tested these changes locally
  • I have checked for broken links
  • Code examples have been tested

Checklist

  • My code follows the style guidelines
  • I have performed a self-review
  • I have made corresponding changes to documentation
  • My changes generate no new warnings

Verification

Each of these was built and served separately before the collapse; the combined tree is what CI is building on this PR now.

node scripts/generate-sessions.js   wrote 22 sessions
tsc --noEmit -p tsconfig.json       clean
docusaurus build                    SUCCESS with onBrokenLinks: throw

Route checks, from the build output:

  • 8 new slug routes render, plus the wallet session's /session-1/ pages
  • 9 old folder-derived routes emit a redirect stub with the right target
  • the six q1-2025 routes redirect to q1-2026
  • three wallet-session routes redirect (Session-1 notes and recordings, Session-2 recordings with its capital S)
  • grep -rL '^slug:' over every session-notes page returns nothing

The generator's failure path is tested rather than assumed. Deleting a slug: line and running it:

EXIT=1
Error: [sessions] …/04-essential-links/session-notes/readme.md has no frontmatter slug.
Every session-notes page needs one, in the shape
/working-group/<quarter>/sessions/<NN-slug>/session-notes. See "Session notes pages" in CONTRIBUTING.md.

sessions.json is byte-identical to before the generator change, because the fallback had no remaining callers.

Notes

Nine of the 23 session-notes pages had no frontmatter slug, so Docusaurus
derived their route from the folder path, which strips the numeric prefix
and keeps the literal "sessions" segment. That meant the archive served two
different URL shapes depending on whether a page happened to carry a slug.

Adds the slug in the shape every other session already uses,
/working-group/<quarter>/sessions/<NN-slug>/session-notes, to:

  q1-2026  09-community-builder-story, 11-open-source-docs,
           12-cardano-developer-pathway
  q4-2025  01-kickoff-orientation, 02-dev-opportunities,
           03-dev-environment-setup, 04-essential-links, 06-repo-walkthrough

Leaves q1-2026/10-wallet-integration/Session-1 alone: its Session-2 sibling
already occupies the clean route for that session, so giving Session-1 a slug
needs a route decision for both, which belongs with the folder normalisation
rather than here.

Two consequences handled in the same commit:

- website/docs/getting-started.md linked the kickoff notes twice by absolute
  path; both now point at the slug route.
- scripts/generate-sessions.js derives hrefs from the slug when there is one,
  so the regenerated src/data/sessions.json moves all eight and picks up
  06-repo-walkthrough as a 22nd session.

The build's onBrokenLinks check is what proves this: it throws on any internal
link that no longer resolves, and it passes.

Refs IntersectMBO#375
The slugs above change eight public URLs. Each old route keeps working
through @docusaurus/plugin-client-redirects, and the misspelled
sesion-notes redirect from IntersectMBO#410 now points straight at the slug route
instead of chaining through the folder route, so every inbound link is one
hop.

Verified in the generated output: all nine old paths emit a redirect stub
with content="0; url=<slug route>", and all eight slug routes render.

Refs IntersectMBO#375
Six pages under q1-2026/07-contributing-intersect and q1-2026/08-open-clinic-1
carried slugs under /working-group/q1-2025/, so their URLs claimed a quarter
three of their own folders never lived in. Nothing was broken for a reader,
but it is the kind of thing that makes a route map lie: 07 and 08 sit inside
2026 and their neighbours' slugs say 2026.

Rewrites the six slugs to match the folder, and adds the six old routes to
the redirect array so inbound links and search results keep working.

Regenerated src/data/sessions.json: the generator reads the slug, so two
carousel hrefs move off q1-2025 with no edit to the script.

Verified in the build output: all six q1-2025 paths emit a redirect stub
pointing at the q1-2026 route, all three spot-checked new routes render, and
sessions.json no longer contains the string q1-2025.

Refs IntersectMBO#375
Four folders under q1-2026 were the only ones in the archive with capitals:
"14-CIP-68 NFT-Standard" (also the only one with a space), its sibling
"Recording", "13-smart-contracts-languages/Recording", and the two wallet
integration parts, "Session-1" and "Session-2". Every other session uses
lowercase-hyphenated names.

Two of the renames change no URL: 14-cip-68-nft-standard's pages and the two
Recording pages all carry slugs that already spell them lowercase.

The wallet integration pair does change URLs, because Session-1's pages had
no slug and were served from the folder path, and Session-2's recordings slug
carried a capital S. Fixes:

- session-1/session-notes and session-1/recordings gain slugs under
  /working-group/q1-2026/sessions/10-wallet-integration/session-1/...
- session-2/recordings loses the capital in its slug
- three redirects keep the old routes alive

Session-2 keeps the clean route for that session rather than handing it to
Session-1 for symmetry with 08-open-clinic-1. Moving it would break a live
URL to fix an inconsistency nobody sees, and the obvious alternative, giving
Session-1 the clean route, would need a redirect at a path a real page then
occupies.

After this, no session-notes page in the archive is slug-less, which is what
the generator change in the next layer depends on.

Verified in the build output: six routes render, three old routes emit
redirect stubs with the right targets, and grep -L '^slug:' over every
session-notes page returns nothing.

Refs IntersectMBO#375
… missing

The generator derived a route from the file path whenever a notes page had
no frontmatter slug, replicating Docusaurus's number-prefix parsing by hand.
That is the bug class this issue exists for: the first version got one
fallback wrong, and only the build's broken-link check caught it.

Every session-notes page now carries a slug (IntersectMBO#411, IntersectMBO#412, IntersectMBO#413), so the
fallback is deleted rather than fixed. A page that forgets one throws by
name with the required shape and a pointer to CONTRIBUTING.md, which fails
the prebuild instead of shipping a URL that the next rename breaks.

CONTRIBUTING.md gains a "Session notes pages" section: the slug is required,
its shape, the lowercase-hyphenated folder rule, how a multi-part session
nests, and that a moved page adds its old route to the redirect array in the
same change.

Verified:
  node --check scripts/generate-sessions.js        clean
  slug deleted from one notes page -> exit 1,
    "[sessions] …/04-essential-links/session-notes/readme.md has no
     frontmatter slug. Every session-notes page needs one, in the shape
     /working-group/<quarter>/sessions/<NN-slug>/session-notes."
  slug restored -> wrote 22 sessions
  docusaurus build                                 SUCCESS, onBrokenLinks: throw

Fixes IntersectMBO#375
@IanoNjuguna IanoNjuguna added documentation Improvements or additions to documentation ci Continuous integration and GitHub Actions labels Nov 22, 2026
@IanoNjuguna IanoNjuguna changed the title refactor(sessions): take the route from the slug, and fail when it is missing feat(docs): slug every session notes page, and the three route fixes that follow Nov 22, 2026
@IanoNjuguna
IanoNjuguna changed the base branch from fix/session-folder-case to fix/session-notes-typo November 22, 2026 13:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration and GitHub Actions documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant