The init.md repository includes a static Vite and React website for browsing templates and copying canonical Markdown content. The site renders the template files underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/bitwikiorg/init.md/llms.txt
Use this file to discover all available pages before exploring further.
templates/ as the authoritative source and provides copy-to-clipboard behavior for the root init.md protocol and complete template bodies. This guide covers local setup, development, and extending the site.
Prerequisites
You need Node.js installed. Checkpackage.json for the version constraints used by the project’s dependencies. No backend, database, or hosted runtime is required — the site is fully static.
Setup and commands
Start the dev server
/ during development so all asset and route references resolve correctly.Project structure
| Path | Purpose |
|---|---|
templates/ | Canonical Markdown source files — the authoritative template content |
src/ | React components and application logic |
src/data/templates.ts | Imports template Markdown via Vite raw imports (?raw); parses frontmatter metadata for display |
scripts/check-templates.mjs | Pre-build template integrity check script |
dist/ | Built output uploaded to GitHub Pages |
templates/ directory is the source of truth. The website imports those files directly — it does not store template bodies as TypeScript strings. When a template is updated, the website reflects the change automatically on the next build or hot reload.
Template integrity check
Runningnpm run build first executes scripts/check-templates.mjs before compiling the site. The full build command is:
- All five expected template files exist under
templates/:minimal_init_protocol.mddry_run_init_protocol.mddevelopment_project_init_protocol.mdagent_init_protocol.mdserver_init_protocol.md
- Each template file contains a frontmatter block delimited by
--- - Each template’s frontmatter includes all eight required metadata fields:
name,target,purpose,mode,creates,configures,validates,optional_outputs
Adding or updating templates
The Markdown files undertemplates/ are the canonical source. To update a template, edit the Markdown file directly. The website picks up the change via Vite’s raw import on the next reload or build.
To add a new template:
- Create a new Markdown file under
templates/with the required frontmatter fields - Add the new template entry to
src/data/templates.tsusing a Vite raw import (?raw) - Add the new file name to the
expectedTemplatesarray inscripts/check-templates.mjs
check-templates.mjs will not cause a build failure — but a template registered in the check that is missing from disk will.
Deployment
The site is deployed to GitHub Pages via GitHub Actions. The deploy workflow builds the Vite site and uploads thedist/ artifact to Pages. The base path in vite.config.ts is set automatically from the GITHUB_REPOSITORY environment variable, so the built assets reference the correct repository sub-path.
The repository is at https://github.com/bitwikiorg/init.md.