Template Vanilla Site MIT

Documentation Site

A premium, minimal, light-mode-first developer-documentation template for DevSnips built with plain HTML, CSS (Pico CSS foundation), and vanilla JavaScript. Split into modular files: code.html (HTML structure) + style.css (the design system) + script.js (router, content, interactions), with preview.html as a self-contained single-file preview of the UI. Layout: header + nested left documentation sidebar + main content + sticky On-this-page TOC. Covers 15 documentation sections (Documentation Home, Introduction, Getting Started, Installation, Quick Start, Vanilla, Components, Templates, Design Tokens, Guides, API Reference, Examples, FAQ, Changelog, Roadmap, Contributing) via hash routing. Includes nested sidebar navigation with active page state, breadcrumbs, sticky scrollspy table of contents, previous/next navigation, a Cmd+K search command palette, code blocks with a lightweight syntax highlighter, copy buttons, tabbed code blocks, callouts, responsive tables, badges, API reference blocks, an edit-on-GitHub action, last-updated metadata, and opt-in light/dark mode. Neutral-first design with one blue accent (never violet/neon), hairline borders, restrained shadows, light code blocks, and editorial typography — following the shared design-tokens.md specification. Fully responsive: sidebar becomes an off-canvas drawer, TOC becomes a collapsible panel, code blocks remain usable, tables adapt without page overflow, from 320px to 1920px. No React, Vue, Next.js, Tailwind, Bootstrap, backend, database, or CMS.

  • Vanilla
  • HTML
Pages
Site
Stack
Vanilla HTML/CSS/JS + HTML
Theme
System
Responsive
Yes
Files
9
License
MIT

Preview

The whole site, live.

Scroll inside the frame, switch viewports, or open the raw preview in a new tab — it is the same file the CLI installs.

Interactive preview
New tab
devsnips.dev/templates/vanilla/documentation-site/
iPhone 390 × 844
Fluid 320 → 1920
Vanilla/Templates/documentation-site Responsive · System · MIT

What's inside

Everything the folder ships.

Straight from the registry's metadata — every line maps to a file you can open in the source tabs below.

  • hash-routed single-page app
  • 15 documentation sections
  • nested sidebar navigation
  • active page state
  • breadcrumbs
  • sticky scrollspy TOC
  • previous/next navigation
  • Cmd+K search command palette
  • syntax-highlighted code blocks
  • copy buttons
  • tabbed code blocks
  • callouts (info/note/tip/warning/danger)
  • responsive tables
  • status badges
  • API reference blocks
  • edit-on-GitHub action
  • last-updated metadata
  • reading-time estimate
  • opt-in light/dark mode
  • mobile sidebar drawer
  • collapsible mobile TOC
  • nav filter
  • reduced-motion safe
  • focus-visible rings
  • keyboard operable
  • Pico CSS foundation
  • modular file split (code.html + style.css + script.js)

Technical

Stack, scripts, structure.

Everything you need to know before you install.

Stack
Framework Vanilla HTML/CSS/JS
Language HTML
Theme System
Browsers Chrome, Firefox, Safari, Edge (modern evergreen browsers)
Files 9

root 4

  • AGENTS.md doc
  • metadata.json config
  • preview.html preview
  • README.md doc

assets/ 2

  • favicon.svg asset
  • logo.svg asset

pages/ 3

  • code.html code
  • script.js code
  • style.css code

Install

One command, whole folder.

Pulls the template into your project through the DevSnips CLI. The registry path below is stable across the CLI, MCP server and Skills.

terminal · npm
npx devsnips add Vanilla/Templates/documentation-site
registry path Vanilla/Templates/documentation-site 9 files

AI-ready

Hand the whole job to your agent — Cursor, Cline, Claude Code or Windsurf. One prompt installs the template, fixes the theme toggle, optimises it and reshapes it for what you are building.

Scaffold the DevSnips template "Documentation Site" (Vanilla/Templates/documentation-site) into this project, then audit, fix and tailor it.

1. Install — if the DevSnips MCP server is connected, fetch the resource with get_resource(id="Vanilla/Templates/documentation-site"). Otherwise run npx devsnips add Vanilla/Templates/documentation-site and install the dependencies the template declares.

2. Audit — check the template end to end before changing anything: theme toggling (dark/light), responsive behaviour, accessibility, unused files and assets.

3. Fix — repair what the audit found, starting with the theme toggle: it must persist across reloads, never flash the wrong theme on first paint, and every component must read the same tokens in both modes.

4. Optimise and adapt — trim what the site does not need, then customise the template for the product being built here: replace the placeholder branding, copy, imagery, navigation and routes so it reads as this project rather than as a demo.

Source

Read it before you ship it.

The README, manifest and entry document — verbatim, straight from the registry.

README.md
# Documentation Site Template (Vanilla)

A premium, minimal, **light-mode-first** developer documentation template built
for DevSnips with plain HTML, CSS (Pico CSS foundation), and vanilla JavaScript.
The template is split into modular files — `code.html` (HTML structure) +
`style.css` (the design system) + `script.js` (router, content, interactions) —
with `preview.html` as a self-contained single-file preview of the UI so you can
open it directly and see exactly how the template looks.

**Technology:** vanilla
**Category:** templates
**Subcategory:** documentation-site
**Type:** single-page (15 documentation sections, hash-routed)

## Files

```
Documentation Site/
├── code.html               # HTML structure (links style.css + script.js) — the modular source
├── style.css               # the design system (Pico CSS foundation + DevSnips --ds-* tokens)
├── script.js               # router + content (15 sections) + interactions (vanilla JS, no deps)
├── preview.html            # single-file preview of the UI (inlines style.css + script.js) — open this to see it
├── metadata.json           # DevSnips registration metadata
├── README.md               # This file
└── assets/
    ├── logo.svg            # DevSnips [D] mark
    └── favicon.svg         # DevSnips favicon
```

## Preview

Open `preview.html` directly in a browser to see the template — it is a
self-contained single-file preview that inlines the CSS and JS:

```bash
cd "Vanilla/Templates/documentation-site"
python3 -m http.server 8080
# visit http://localhost:8080/preview.html
```

For development and customization, work with the split files — open `code.html`
(which references `style.css` and `script.js` relatively) in the same served
folder. The whole template runs without a build step. The only external requests
are Google Fonts (Inter + JetBrains Mono) and Pico CSS, both from CDNs.

Per the shared `design-tokens.md` convention, the template folder contains
exactly **one** `preview.html`. It is the canonical preview shown by the DevSnips
website. It is fully responsive, uses the template's real CSS/JS, uses relative
paths, and loads correctly when opened directly.

### Architecture

The template is split into three modular files plus a single-file preview:

- **`code.html`** — the HTML shell (header, sidebar, main, TOC, search modal,
  drawer) that links `style.css` and `script.js`. This is the modular source you
  customize.
- **`style.css`** — the entire design system: Pico CSS overrides, the `--ds-*`
  token layers, and every component style.
- **`script.js`** — the runtime + content: a `NAV` config drives the nested
  sidebar, a `PAGES` object maps each section ID to a content-builder function,
  and the runtime handles routing, scrollspy, search, code tools, theming, and
  the mobile drawer. All content for all 15 sections lives here — there are no
  separate `pages/`.
- **`preview.html`** — a self-contained single-file preview that inlines
  `style.css` and `script.js` into the `code.html` structure, so it can be opened
  directly with no build step and renders identically to the modular version.

### Sections (15)

| Group | Sections |
|---|---|
| **Start** | Documentation Home, Introduction, Getting Started, Installation, Quick Start |
| **Library** | Vanilla, Components, Templates, Design Tokens |
| **Reference** | Guides, API Reference, Examples, FAQ |
| **Project** | Changelog, Roadmap, Contributing |

### Design system

The template extends the shared DevSnips `--ds-*` token system (defined in
`Vanilla/Templates/design-tokens.md`) with a handful of `--template-*` variables
that adapt — never override — the global language. It is **neutral-first** with
one controlled **blue-600** accent (never violet/neon), hairline 1px borders,
restrained shadows, an Inter + JetBrains Mono type scale, a base-4 spacing
scale, and small radii by default. Light and dark mode are supported via a
`data-theme` attribute on `<html>` with a no-flash system-preference fallback.

## Features

- **Single SPA** covering all 15 documentation sections via hash routing
- **Nested sidebar navigation** with four groups, expandable parents, active
  page state (`aria-current`), and a live filter input
- **Breadcrumbs**, **last-updated metadata**, **reading-time estimate**, and an
  **edit-on-GitHub** action on every content page
- **Sticky scrollspy table of contents** generated per page from `h2`/`h3`
  headings via `IntersectionObserver`; collapses to a tappable panel below 1180px
- **Previous/next navigation** at the foot of every content page
- **Cmd+K (and `/`) search command palette** — arrow-key navigation, Enter to
  open, Esc to close, grouped results with matched-term highlighting
- **Code blocks** with a lightweight vanilla-JS syntax highlighter
  (HTML, CSS, JS, JSON, Bash), a language label, and a **clipboard copy button**
- **Tabbed code blocks** (e.g. npm/pnpm/yarn) with ARIA tablist semantics
- **Five callout variants** — info, note, tip, warning, danger
- **Responsive tables** in `overflow-x:auto` wrappers (never cause page overflow)
- **Status/category badges** — stable, beta, deprecated, accent, neutral, solid
- **API reference blocks** with signature, return type, parameter table, example
- **Light/dark mode** — no-flash system preference + persisted header toggle
- **Responsive by composition** — sidebar → off-canvas drawer below 1024px,
  TOC → collapsible panel below 1180px, header compacts below 640px

## Accessibility

Skip link, semantic landmarks (`header`/`main`/`nav`/`aside`/`article`), ARIA
on the search dialog, tablists, drawer, breadcrumbs, and TOC, `:focus-visible`
rings throughout, keyboard-operable controls (Escape closes overlays, Cmd/Ctrl+K
and `/` open search, arrow keys navigate results), and `prefers-reduced-motion`
guards on every animation.

## QA

Verified with Playwright across six viewport widths (320–1920px):

- **0 console errors** on every page and breakpoint
- **0 horizontal overflow** — `scrollWidth == clientWidth` at 320, 375, 768,
  1024, 1280, and 1920px
- Strict HTML5 valid (html5lib), valid `metadata.json`
- Interactions pass: hash routing + active nav, scrollspy TOC, search open/close,
  theme toggle, code copy buttons, code tabs, mobile drawer open/close

Zero runtime dependencies beyond Pico CSS and Google Fonts (both from CDN).

## Customizing

The whole template is data-driven from the top of the `<script>` block in
`preview.html`:

- `NAV` — sidebar structure (groups, items, nested children, badges)
- `META` — per-page eyebrow, title, last-updated date, edit-on-GitHub path
- `PAGES` — per-section content-builder functions

To add a section: add an entry to `NAV`, a row to `META`, and a `PAGES.<id>`
function. The router, TOC, search index, and prev/next pick it up automatically.
142 lines UTF-8 · LF