This repository is a Dyne-styled VitePress template and conversion workspace. Keep changes simple, reversible, and local to the requested site.
- Do not commit anything from this repository unless the user explicitly asks.
- Preserve existing content first. Reuse pages, images, metadata, links, and domain files by reorganizing them into the VitePress site.
- Do not delete or move legacy HTML pages unless the user explicitly asks.
- Preserve public URLs for existing HTML pages. When converting a site, copy
legacy root HTML pages into the VitePress
public/directory so they still build at root, such as/old-page.html. - When a site may be served from a subpath, such as
/hasciicam/, use relative links in converted markdown where practical and build withBASE_PATH=/subpath/ npm run build. - Normalize legacy internal links that point to an old absolute site root, such
as
https://ascii.dyne.org, into relative links before copying them topublic/. - Prefer the template already present in this repository over introducing new dependencies or a new theme.
- Keep generated and dependency folders out of normal versioning:
node_modules/,.vitepress/dist/,.vitepress/cache/, and local build artifacts should be ignored in the target site when appropriate.
Use template/ as the canonical VitePress source:
template/.vitepress/for config, theme, components, and styling.template/public/for shared Dyne assets.template/package.jsonandtemplate/package-lock.jsonfor the VitePress dependency setup.template/index.md,template/guide.md, andtemplate/about.mdonly as content shape examples, not as final copy.
Do not copy template/node_modules/ or template/.vitepress/dist/.
When the user points to a subdirectory, create the VitePress website inside that subdirectory without versioning it from this root repository.
- Inspect the subdirectory before editing.
- Copy the template VitePress setup into the subdirectory:
.vitepress/package.jsonpackage-lock.json- shared files from
template/public/
- Copy existing static assets into the subdirectory's
public/tree. - Copy existing root HTML pages into
public/to preserve their output paths. - Replace only the root
index.htmlwhen converting it into VitePressindex.md. - Convert the original index content into a markdown page when requested, often
as
usage-guide.mdor another user-provided name. - Update
.vitepress/config.mtswith the site's real title, description, nav, social links, and sidebar. - Run
npm installandnpm run buildfrom the target subdirectory. If the site is served from a subpath, run the build withBASE_PATH=/subpath/. - Verify generated root paths in
.vitepress/dist/, especially legacy HTML pages and images.
When the user wants this template applied to a parent or external directory, treat this repository as the source template and the parent as the target.
- Inspect the parent target first.
- Copy only the template files needed for a VitePress site.
- Preserve the target's existing content and public URLs.
- Reorganize existing target information into VitePress markdown and
public/, keeping legacy HTML pages at their existing output paths. - Build and verify from the parent target.
- Do not commit in either repository unless the user explicitly asks.
- Main landing pages should normally become VitePress
index.mdwith a hero, a concise description, primary actions, and feature cards. - Preserve detailed legacy index content as a markdown guide page instead of discarding it.
- Keep external download/source links intact unless the user supplies new ones.
- Keep old images and captions meaningful; prefer real project imagery already present in the source site.
- Keep wording faithful to the existing site, but clean obvious typos and obsolete presentation markup when converting to markdown.
When the source project contains nroff man pages, use the bundled
man-to-md.pl converter instead of transcribing them by hand. The script reads
one man page from standard input and writes Markdown to standard output:
perl /path/to/dyne-vitepress/man-to-md.pl < path/to/tool.1 > tool.1.md- Run the command once per man page and place the generated
.mdfiles in the target VitePress content tree. - Keep the man page as the source of truth. Regenerate the Markdown after the source changes; do not maintain divergent prose in both files.
- Use
-cto mark generated output when useful:perl /path/to/dyne-vitepress/man-to-md.pl -c < tool.1 > tool.1.md. - The converter supports nroff man macros beginning with
.TH. It rejects mdoc pages beginning with.Ddor.Dt; convert those with an appropriate external tool or document the unsupported input instead of rewriting the source. - Inspect the generated Markdown for headings, synopsis blocks, lists, links, and escaped characters before publishing.
- Add published manual pages to the VitePress nav or sidebar when appropriate, then run the normal build validation.
- Run
perl man-to-md.pl --helpfrom this repository to see optional section insertion, formatting, title-casing, and dash-handling flags.
After changes, run from the target site:
npm install
npm run buildThen verify:
.vitepress/dist/index.htmlexists.- Converted markdown pages render as expected.
- Legacy HTML pages still exist at
.vitepress/dist/<page>.html. - Legacy assets referenced by those pages exist under
.vitepress/dist/. - Subpath builds prefix VitePress URLs with the configured base, and copied legacy HTML pages use relative links that remain under that subpath.
git statusshows no accidental commits and no unexpected tracked changes.