Documentation Runtime
vango-docs is the markdown-first documentation package used by this site. It is designed for first-party docs sites, product docs, SDK docs, and embedded documentation sections inside Vango apps.
What It Provides
markdown loading from a docs directory
YAML or TOML frontmatter
route generation from file paths or explicit slugs
sidebar sections and prev/next navigation
local in-memory search with Cmd/Ctrl+K
grouped code tabs with persistent language selection
copy-page output for AI workflows
embedded Vango components from markdown
served CSS and JS assets under the docs asset path
Standard Install
1site, err := vangodocs.New(vangodocs.Config{
2 Title: "My Docs",
3 BasePath: "/docs",
4 Source: vangodocs.Dir("docs"),
5 Search: vangodocs.SearchLocal(),
6})
7if err != nil {
8 log.Fatal(err)
9}
10
11if err := vangodocs.Install(app, site); err != nil {
12 log.Fatal(err)
13}
With this shape:
docs/index.md is served at /docs
docs/guides/getting-started.md is served at /docs/guides/getting-started
the docs shell includes search, sidebar nav, table of contents, copy-page, and code tabs
Rendering APIs
| default app route and asset registration | vangodocs.Install(app, site) |
|---|---|
| route registration only | vangodocs.Mount(app, site) plus vangodocs.AttachAssets(app, site) |
| custom mux asset serving | vangodocs.AssetsHandler(site, next) |
| full docs shell for one route | vangodocs.Page(site, ctx, requestPath) |
| article body only | vangodocs.Article(site, ctx, requestPath) |
| full shell with custom main content | vangodocs.Layout(site, ctx, requestPath, children) |
Page and Layout render stylesheet and script references to site.AssetsPath()/vangodocs.css and site.AssetsPath()/vangodocs.js. Article is body-only and does not emit asset references. Apps that use file-based docs routes should keep rendering with Page or Layout, then attach the asset handler during app setup.
Current Boundaries
sources are directory-based today with vangodocs.Dir("docs")
search is local and in-memory
raw HTML blocks are not rendered
theming is CSS override based, not a tokenized theme API
aliases are lookup aliases, not automatic redirects
This site uses the package
The Vango website renders its docs through file-based Vango routes backed by `vango-docs` and registers a small set of markdown components for overview cards, concept cards, and callouts.