📌 Repository Website Builder
This folder contains a Git-based static website builder for the repository.
Behavior
- Uses Git source files from tracked and untracked non-ignored entries (
git ls-files --cached --others --exclude-standard) - Excludes ignored/untracked-ignored files by honoring standard Git ignore rules
- Requires Git metadata (no fallback mode)
- Writes generated output to
dist/ - Uses URL-safe normalized routes (kebab-case)
- Fails the build on normalized route conflicts
Workspace Usage
From Documents/technical/Software:
vp run website:dev
vp run website:build
vp run maintain:markdown
From this folder (website):
vp run dev
vp run build
vp run preview
dev uses vp dev with a Vite plugin hook that regenerates dist/ on source changes. The dev server uses port 5174 (override with WEBSITE_DEV_PORT) and fails if that port is busy, because the command center locates it by that port.
Route Rules
- No synthetic
treeorblobfolders are generated. - Routes are path-based and URL/file-safe.
- Single exception: paths under
Documentsare collapsed to root-level routes in the generated site. - Shared route normalization is defined in
../scripts/markdown-index-rules.mts. - Index precedence for directory default pages is
README.md, thenindex.md. - Matching for index filenames ignores case and extra spaces, including spaces before
.md. - The winning index candidate is treated as index; lower-precedence candidates remain regular pages.
- Conflicts after collapsing/normalization fail the build with a clear error.
Page Augmentations
- Augmentation files live in
site/and are matched by virtual source path (afterDocuments/collapse) and basename. - Current supported augmentation types:
.cssand.js. - A matching
site/<same-path>/<same-name>.cssis injected into the generated page<head>as an inline<style>block. - A matching
site/<same-path>/<same-name>.jsis injected at the end of the generated page<body>as an inline<script>block. - Example: source
README.mdis augmented bysite/README.css. - Example: source
README.mdis augmented bysite/README.js. - The repository architecture page uses
site/Repository Architecture.cssandsite/Repository Architecture.js; the latter readssite/modules/software-architecture.jsonand loads the diagram controls, arrow renderer, and visibility model fromsite/modules/architectureDiagram.js,site/modules/architectureArrows.js, andsite/modules/architectureVisibility.js. - The repository architecture tree uses
site/Repository Architecture Tree.cssandsite/Repository Architecture Tree.js, with the same generated architecture data and the tree modules insite/modules/. - Nested paths are supported. Example: source
Documents/technical/notes/Plan.mdmaps tosite/technical/notes/Plan.css. - Static folders
site/css/,site/icons/, andsite/modules/, andsite/site-config.jsonremain reserved and are not treated as augmentations. - Files owned by other packages are published at fixed URLs from
../scripts/published-package-assets.mts:dist/css/brand.css,dist/css/brand-sequence.css, anddist/modules/brand-sequence-motion.js(TypeScript types stripped), all from@reasontracker/components. - Augmentation collisions that normalize to the same key fail the build with a clear error.
- The output route stays source-driven; augmentation files never change page URLs.
Notes
- The publisher excludes source entries under this folder's
dist/path from generation input. - Publish diagnostics are written to
scripts/publish-website-report.mdonly when--write-reportis passed. devruns publish with--no-reportto avoid watcher loops from report-file writes.- Set the displayed site name in
site/site-config.jsonviasiteName. - The collapsed root folder and index precedence are defined in
../scripts/markdown-index-rules.mts, which this publisher and markdown maintenance share. vp run architecture:mapgenerates the architecture data copied fromsite/modules/;vp run website:build:with-mapruns generation before publishing.site/index.htmlis not required and is intentionally omitted.- Markdown maintenance validates source markdown links (not generated HTML), updates files in place, and only auto-adds autonav links on index-style pages.