Add Eleventy static scaffold, content-generation scripts, site templates, and CI/tests - #4
erinepshovel-code wants to merge 1 commit into
Conversation
| } | ||
| if (!entry.isFile()) continue; | ||
| const info = await stat(fullPath); | ||
| const buffer = await readFile(fullPath); |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82914bf7b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| push: | ||
| branches: [main] |
There was a problem hiding this comment.
Disable the duplicate Pages deploy workflow
This new workflow also deploys on pushes to main, but I checked .github/workflows/deploy.yml and it still has its own push-to-main Pages deployment that uploads ./ instead of _site. On every main push both workflows can publish to the same GitHub Pages environment; whichever deployment finishes last wins, so the generated Eleventy site can be replaced by the repository root/legacy HTML. Remove or retarget the old workflow before enabling this trigger.
Useful? React with 👍 / 👎.
| reviewStatus: 'hmmm' | ||
| }; | ||
| units.push(unit); | ||
| for (const match of content.matchAll(/\[(\d+|[a-z])\]/gi)) { |
There was a problem hiding this comment.
Detect the canon's superscript footnotes
The current canon snapshot uses superscript note markers and blockquoted notes (for example Article One has all¹ and >¹), but this pattern only recognizes bracketed markers like [1]. With the committed data that leaves generated.canon.notes empty, so Lab pages never render the note-speaker turns they are meant to expose for the articles; include the superscript markers/blockquote notes in the parser before relying on this field.
Useful? React with 👍 / 👎.
| try { | ||
| const branchInfo = curlJson(`${apiBase}/branches/${branch}`); | ||
| const contentInfo = curlJson(`${apiBase}/contents/${encodeURIComponent(path).replaceAll('%2F', '/')}?ref=${branch}`); | ||
| text = curlText(rawUrl); |
There was a problem hiding this comment.
Pin the fetched canon text to the recorded commit
When wayseer00/main advances during this script's three network requests, commit and blob are recorded from the earlier API responses but the text is fetched from the mutable branch URL here. That can publish source pages whose document hash/content came from a different revision than the displayed commit/blob, undermining the provenance this scaffold surfaces; fetch the raw file by the resolved commit SHA or from the same content response.
Useful? React with 👍 / 👎.
|
Superseded by merged PR #5 ( |
Motivation
hmmmrather than hiding incomplete automation.Description
package.json, add.nvmrc, add.eleventy.jsto configure markdown, passthrough assets, and small filters.scripts/to fetch and snapshot the canonical text and GitHub organization (fetch-canon.mjs,fetch-github-org.mjs), parse canonical units (parse-canon.mjs), discover artifacts (find-artifacts.mjs), and synthesize reports and manifests (build-manifest.mjs,build-legacy-routes.mjs,build-change-report.mjs).src/to generate surfaces: Start, Way, Lab, Source, Projects, Artifacts, Legacy redirects, sitemap, 404, and supporting includes.tests/(Node--testharness) validating generated data, pages, provenance, legacy route redirects, and basic site artifacts; include Playwright and Pagefind dev dependencies and apagefindUI hook for search.pull-request.ymlto runnpm run checkandpages.ymlto build and publish the_siteartifact to GitHub Pages.src/_data/snapshotsandsrc/_data/generatedso the site is reviewable in this branch (includescanon.json,repos.json,legacyRoutes.json,buildManifest.json,changes.json, andartifacts.json).Testing
npm run check(which runsnpm run buildthen Node tests) via thepull_requestandPagesworkflows; the check runs the build pipeline and the Node test suite.tests/:artifacts-inventory.test.mjs,canon-integrity.test.mjs,canon-source.test.mjs,generated-artifacts.test.mjs,legacy-routes.test.mjs,links.test.mjs,repo-coverage.test.mjs,research-ledger.test.mjs, andtwo-click-source.test.mjs, and these automated checks succeeded in this rollout.test:e2e) and accessibility/performance smoke tasks are configured but not executed by the defaultcheckstep in this PR workflow.Codex Task