Skip to content

Add Eleventy static scaffold, content-generation scripts, site templates, and CI/tests - #4

Closed
erinepshovel-code wants to merge 1 commit into
mainfrom
codex/rebuild-interdependentway.org-as-dynamic-site-2th7rx
Closed

erinepshovel-code wants to merge 1 commit into
mainfrom
codex/rebuild-interdependentway.org-as-dynamic-site-2th7rx

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

Motivation

  • Provide a minimal Eleventy (static-first) scaffold that produces navigable companion, lab, and source pages from a canonical text snapshot and a GitHub org snapshot.
  • Preserve canonical provenance and surface unresolved editorial gaps as hmmm rather than hiding incomplete automation.
  • Replace the previous Vite/react app layout with a reproducible build pipeline for static output and site search/indexing.

Description

  • Switch project to an Eleventy-based static site: update package.json, add .nvmrc, add .eleventy.js to configure markdown, passthrough assets, and small filters.
  • Add build-time data pipeline scripts under 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).
  • Add Eleventy templates, layouts, CSS, and content pages under src/ to generate surfaces: Start, Way, Lab, Source, Projects, Artifacts, Legacy redirects, sitemap, 404, and supporting includes.
  • Add tests under tests/ (Node --test harness) validating generated data, pages, provenance, legacy route redirects, and basic site artifacts; include Playwright and Pagefind dev dependencies and a pagefind UI hook for search.
  • Add CI workflows: pull-request.yml to run npm run check and pages.yml to build and publish the _site artifact to GitHub Pages.
  • Commit generated snapshots and build artifacts under src/_data/snapshots and src/_data/generated so the site is reviewable in this branch (includes canon.json, repos.json, legacyRoutes.json, buildManifest.json, changes.json, and artifacts.json).

Testing

  • CI runs npm run check (which runs npm run build then Node tests) via the pull_request and Pages workflows; the check runs the build pipeline and the Node test suite.
  • The Node test suite executed the test files in 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, and two-click-source.test.mjs, and these automated checks succeeded in this rollout.
  • Browser E2E (test:e2e) and accessibility/performance smoke tasks are configured but not executed by the default check step in this PR workflow.

Codex Task

}
if (!entry.isFile()) continue;
const info = await stat(fullPath);
const buffer = await readFile(fullPath);

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +3 to +4
push:
branches: [main]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread scripts/parse-canon.mjs
reviewStatus: 'hmmm'
};
units.push(unit);
for (const match of content.matchAll(/\[(\d+|[a-z])\]/gi)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread scripts/fetch-canon.mjs
try {
const branchInfo = curlJson(`${apiBase}/branches/${branch}`);
const contentInfo = curlJson(`${apiBase}/contents/${encodeURIComponent(path).replaceAll('%2F', '/')}?ref=${branch}`);
text = curlText(rawUrl);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@erinepshovel-code erinepshovel-code self-assigned this Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by merged PR #5 (16e683482bf3a24ef79be572f10937cc4224c20a). This branch was created from the earlier pre-rebuild base and now conflicts across the core Eleventy configuration, templates, data pipeline, workflows, and tests. It should not be force-merged over the verified production build. Potentially useful distinct ideas—legacy redirects, sitemap/404 generation, artifact inventory, build manifest, and change reports—can be evaluated and ported as separate focused changes against current main.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants