📌 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 website:publish
vp run website:preview
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.
Route Rules
- No synthetic
treeorblobfolders are generated. - Routes are path-based and URL/file-safe.
- Single exception: paths under the configured root folder (
collapsedSourceRootNameinsite/site-config.json, defaultDocuments) are collapsed to root-level routes in the generated site. - Index precedence for directory default pages comes from
indexFileNamesinsite/site-config.json(default: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. - 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. - 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. - Configure collapsed root folder name in
site/site-config.jsonviacollapsedSourceRootName(case-insensitive). - Configure directory index candidates in
site/site-config.jsonviaindexFileNames. - Invalid values for
collapsedSourceRootNameorindexFileNamesfail publish/maintenance with a clear config error. 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.