Brand & Design Guide
The site is a VitePress app in this repository: theming lives in src/.vitepress/theme/custom.css and src/.vitepress/config.mts, not in any hosted space's settings. This page is the spec for those two files, plus the in-repo conventions that keep pages consistent.
Visual Identity
High-contrast dark mode with neon accents — built for smart contract developers who live in dark editors.
Palette
The tokens below are the ones custom.css actually defines (the /* Tollcraft Core Design Tokens */ block); the tier variables are what colour a tier's cards, pills, and badges take.
| Role | Token | Value |
|---|---|---|
| Background (dark) | --void | #07050d |
| Raised surface | --void-2 | #0c0a16 |
| Text | --paper | #f4f1ff |
| Primary accent | --violet | #8b5cf6 |
| Tier 1 — Prevent | --t1 (cyan) | #22d3ee |
| Tier 2 — Detect | --t2 (magenta) | #e879f9 |
| Tier 3 — Diagnose | --t3 (amber) | #fbbf24 |
Theme configuration
All of this is code review, not a settings panel:
- Appearance:
config.mtssetsappearance: 'force-dark'. Dark is the design; the toggle is off deliberately rather than forgotten. - Brand mapping:
--vp-c-brand-1/2/3map to--violet,--cyan,--magenta, so links, active nav items and container accents all resolve to the palette above. - Fonts:
--font-displayis Unbounded (headings),--font-bodyInstrument Sans,--font-monoJetBrains Mono, loaded from Google Fonts at the top ofcustom.css. - Logo & favicon:
themeConfig.logopoints at/favicon.png, andconfig.mtsemits the icon<link>tags relative tobaseso they resolve under/docs/on Pages. - Page layout:
cleanUrls: true, local search provider, and the per-tier sidebars underthemeConfig.sidebar.
INFO
Unbounded and Instrument Sans are webfont loads; if the CDN is unreachable the site falls back to sans-serif and the palette plus dark default still carry most of the aesthetic.
In-Repo Conventions
These keep new pages consistent without any hosted configuration:
- Custom containers are VitePress's four, and they carry the accent colours:
dangerfor cost pitfalls ("Why is this bad?"),tipfor fixes,warningfor operational gotchas,infofor cross-references. There is nosuccesscontainer — GitBook had one, and the migration to this site did not carry it over. - One emoji per H1/section header as a visual marker (⚡ 🔍 🔌 🎨) — one, not several.
- Code blocks open with a fence that names the language, and the filename goes in the sentence above the block when the reader is meant to create that file.
- Lint pages follow the shared template: severity → what it does → why it's bad (
danger) →❌ Badexample → suggested fix (tip).
Where the site is built and served
Documentation is a VitePress site in this repository, not a hosted space:
- Live site: https://tollcraft.github.io/docs/
- Source:
src/in Tollcraft/docs;src/.vitepress/config.mtsholds nav and sidebars,src/.vitepress/theme/custom.cssholds the palette. - Base path:
config.mtssetsbase = process.env.CI ? '/docs/' : '/', so links resolve correctly both locally and under the Pages sub-path. - Deploy: a GitHub Actions workflow builds
src/.vitepress/distand publishes it to Pages on push tomain. There is no.gitbook.yamland noSUMMARY.md— navigation is thesidebarobject, and a page that is not listed there is still built but unreachable from the menu. - The old GitBook space at
tollcraft.gitbook.io/docsis stale. It still answers HTTP 200, which is why links to it survive unnoticed; anything pointing there should point athttps://tollcraft.github.io/docs/with the page's own path.