Skip to content

Latest commit

 

History

History
71 lines (55 loc) · 3.23 KB

README.md

File metadata and controls

71 lines (55 loc) · 3.23 KB

A7 documentation site

GitHub Pages hosts the static A7 documentation at https://code5717.github.io/a7-py/. This README covers the site build and content workflow. The project README covers the A7 compiler.

Build and preview

Run these commands from the repository root. The Pages workflow pins Bun 1.4.5.

cd site
bun install --frozen-lockfile
bun run build
bun run preview

The preview serves dist/ at http://127.0.0.1:4173/a7-py/. Set PORT to change the port. The server returns 404 for missing resources and serves JSON with its JSON content type. GitHub Pages controls production HTTP headers.

Edit documentation

Path What it holds
public/docs/ Markdown sources for the rendered pages and agent-readable topics
content/features.json Feature records used by the site
scripts/content.ts The registry shared by HTML, search, sitemap, manifest, and agent exports
scripts/visuals.ts Inline SVGs and compiler workbench, enhanced by src/site.js
src/site.css Theme tokens, layout, typography, and responsive rules
docs/ Site design decisions and verification records

Each Markdown topic starts with frontmatter for its title, navigation group, summary, and order, followed by one H1. Link to topics using paths such as /a7-py/docs/language/functions.md. The renderer converts those paths to HTML page URLs. Markdown-it renders CommonMark with table support and disables raw HTML. Code fences retain their literal source.

Check and publish

Run bun run sync:exports after editing topics or feature metadata. It updates the tracked llms.txt, llms-full.txt, sitemap, and docs manifest. Ordinary builds write only to dist/. The manifest digest identifies the published documentation corpus.

Run bun run check from site/ for lint, TypeScript, feature coverage, tests, the static build, export freshness, and internal links. Tests cover the renderer, publication, and preview server. The Pages workflow checks the tracked exports before uploading the build.

Design and verification

Bun bundles and minifies the stylesheet. The deployed site uses static HTML. Content, navigation, outlines, and Markdown links work without JavaScript. JavaScript adds search, copy controls, and outline tracking. The initial theme follows the system. Explicit preferences apply before paint and persist when storage is available.

Selecting a search result on the current page closes the dialog and focuses the destination heading. Dismissing search returns focus to its opener.

The documentation layout uses a 240px navigation rail and a 180px outline. Native disclosures replace the rail below 900px and the outline below 1200px. The landing page has its own layout with the compiler workbench, pipeline and four documentation links. Article prose uses Geist Variable with JetBrains Mono for code and ligatures disabled. The build copies both pinned fonts and their licenses and preloads the prose font.