Ecosystem

Trail

A static site generator built for documentation. Markdown in, beautiful docs out. Pathways guide readers through content in curated sequences.

go install github.com/peios/trail@latest

trail build --dir ./my-docs --output ./_site
trail serve --dir ./my-docs --port 3000

Features

Pathways

Define curated reading sequences. Readers follow a guided path through your content with prev/next navigation.

Fuzzy search

Client-side search powered by Fuse.js. Keyboard navigation, result highlighting, instant results.

Dark mode

System preference detection with manual toggle. Persisted in localStorage, no flash on load.

Syntax highlighting

Build-time highlighting via Chroma. No client-side JavaScript needed for code coloring.

Mermaid diagrams

Write diagrams in markdown, rendered client-side. Respects dark mode theme automatically.

Admonitions

Note, Warning, Important, Tip, and Caution callouts using GitHub-style syntax.

Tab groups

Show the same content multiple ways — CLI vs API vs config — with tabbed panels.

Live reload

Edit markdown, the browser refreshes. SSE-based with file watching during development.

Print all

A /print/ page renders every article on one page for printing or saving as PDF.

Also includes

Breadcrumbs Scroll spy Heading anchors Copy code button Mobile nav Mobile ToC Back to top Font size controls Category pages 404 page Sitemap.xml robots.txt Open Graph tags Canonical URLs Announcement bar Draft pages Edit on GitHub Link validation Inter-page links Collapsible sections Reading time Related pages Page type icons Print stylesheet Custom head injection Configurable nav

How it works

Trail reads markdown files with YAML frontmatter from a content/ directory, pathway definitions from pathways/, and site config from trail.toml. It outputs a fully static site that can be deployed to GitHub Pages or any static host.

your-docs/
  trail.toml              # site config
  pathways/
    getting-started.toml  # curated reading sequences
  content/
    identity/
      understanding-identity.md
      what-are-sids.md
    access-control/
      how-sds-work.md