Skip to content

Session index generator, repo metadata and types (stack 1 of 6, no visual change) - #380

Merged
danbaruka merged 1 commit into
IntersectMBO:mainfrom
IanoNjuguna:stack/01-session-index
Nov 7, 2026
Merged

danbaruka merged 1 commit into
IntersectMBO:mainfrom
IanoNjuguna:stack/01-session-index

Conversation

@IanoNjuguna

@IanoNjuguna IanoNjuguna commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What this does

Three files that no page renders yet, shipped first so the landing page above it can import them. Merging this changes nothing a visitor sees.

scripts/generate-sessions.js reads the archive's frontmatter and writes src/data/sessions.json. It derives each href from the file's own path, accounting for Docusaurus stripping number prefixes and for readme/index folders, because the archive is inconsistent: most sessions carry a slug: that includes their number, eight have none and are served at the number-stripped path, and two folders are both numbered 14. Checked against the built output: 21 sessions, 26 session-notes routes, none missing.

scripts/fetch-github-data.js also calls /repos/{owner}/{repo} and writes a repo block into githubData.json, with the same keep-on-failure rule as the rest of that script. The block is seeded once so a local build has stars and forks to render; the prebuild refreshes it.

@types/react-dom arrives for the components that follow.

Why this is a separate PR

It is the bottom of a five-PR stack, and it is the only layer that changes nothing a visitor sees:

PR Layer Size
this session generator, sessions.json, repo metadata, types 6 files, +327 −6
#384 design tokens, no visual change 1 file, +108 −2
#383 the landing page 14 files, +2003 −438
#385 section 04 and the sessions control 6 files, +551 −226
next the footer 3 files, +296 −37
next the bar and the phone menu sheet 10 files, +673 −43

Verified

  • npx tsc --noEmit clean
  • npx docusaurus build succeeds
  • No component imports the new files, so the rendered site is byte-identical apart from the regenerated sessions.json

Three things that no page renders yet, shipped first so the landing page can import them.

`scripts/generate-sessions.js` reads the archive's frontmatter and writes
`src/data/sessions.json`. It derives each href from the file's own path, accounting for
Docusaurus stripping number prefixes and for `readme`/`index` folders, because the archive is
inconsistent: most sessions carry a `slug:` that includes their number, eight have none and are
served at the number-stripped path, and two folders are both numbered 14. 21 sessions against
26 built routes, none missing.

`scripts/fetch-github-data.js` also calls `/repos/{owner}/{repo}` and writes a `repo` block,
with the same keep-on-failure rule as the rest of that script. `githubData.json` gains that
block so a local build has stars and forks to render.

`@types/react-dom` arrives for the components that follow.
@IanoNjuguna IanoNjuguna changed the title Session index generator, repo metadata and types (stack 1 of 2, no visual change) Session index generator, repo metadata and types (stack 1 of 5, no visual change) Nov 7, 2026
@IanoNjuguna IanoNjuguna changed the title Session index generator, repo metadata and types (stack 1 of 5, no visual change) Session index generator, repo metadata and types (stack 1 of 6, no visual change) Nov 7, 2026

@danbaruka danbaruka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@danbaruka
danbaruka merged commit c19bd7f into IntersectMBO:main Nov 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants