This repo houses the BitFi documentation site built with VitePress. Author, preview, and publish the docs that power the BitFi handbook.
- Install dependencies (Node 18+ recommended):
yarn install- Run the docs locally:
yarn dev- Build for production:
yarn build- Preview the built site:
yarn previewdocs/: all docs content. Entry point isdocs/index.md.docs/.vitepress/config.ts: site config, nav, theme settings.docs/.vitepress/theme/: custom styles/components.docs/public/: static assets served at the site root.
- Author pages in Markdown under
docs/, keeping the existing folder structure (background/,how-to/, etc.). - Use relative asset paths (place images in
docs/public/or alongside the page). - For math,
markdown-it-mathjax3is available; wrap expressions with$...$or$$...$$. - Embed guides (Scribe/Tango) with a responsive wrapper so iframes scale on mobile:
Tango embeds use the same wrapper; add their sandbox/referrerpolicy when required:
<div style="position: relative; width: 100%; max-width: 100%; aspect-ratio: 4 / 5; min-height: 480px;"> <iframe src="https://scribehow.com/embed/...your_id..." style="position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px;" allow="fullscreen" ></iframe> </div> [Open in a new tab](https://scribehow.com/viewer/...){target="_blank" rel="noreferrer"}
<iframe src="https://app.tango.us/app/embed/...your_id..." sandbox="allow-scripts allow-top-navigation-by-user-activation allow-popups allow-same-origin" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="allowfullscreen" ></iframe>
yarn dev: local dev server atlocalhost:5173(default VitePress port).yarn build: generate static site indocs/.vitepress/dist.yarn preview: serve the built output locally.
- Keep navigation and sidebar updates in
docs/.vitepress/config.tssynchronized with new/renamed pages. - Prefer concise pages with clear frontmatter; add brief context comments in Markdown only when it aids readers.
- Run
yarn buildbefore publishing to ensure the site renders without errors.