MDX Docs

A minimal documentation site written entirely in Tish. Demonstrates file-based routing, build-time pre-rendering, MDX format with frontmatter, and pure static HTML + CSS (no JavaScript).

Features

  • File-based routingcontent/*.mdx maps to routes (index.mdx/, about.mdx/about)
  • MDX format — Frontmatter with title, description, and custom metadata
  • Pre-rendered at build timebuild.tish generates static HTML to dist/
  • Pure static frontend — HTML + Tailwind-style CSS, no JavaScript

Build

Pre-render MDX content to static HTML:

tish run src/build.tish --features fs,regex

Or with tish from the repo:

cargo run -p tishlang--manifest-path ../../Cargo.toml --release --features full -- run src/build.tish

Run

Start the HTTP server:

tish run src/main.tish --features http,fs

Or compile to native:

tish build src/main.tish -o mdx-docs --features http,fs
./mdx-docs

Then open http://localhost:3000 (or the port shown; use PORT=3010 to override).

Project Structure

mdx-docs/
├── tish.yaml
├── src/
│   ├── build.tish   # Pre-renders content/*.mdx → dist/
│   └── main.tish    # HTTP server serving dist/
├── content/         # MDX source files (file-based routing)
│   ├── index.mdx
│   ├── about.mdx
│   └── getting-started.mdx
└── dist/            # Generated by build (gitignored)

Deploy

Deploy with Zectre. Run the build step before compiling so dist/ exists (or run build.tish in CI and bundle the output). See Deploy Overview for details.

Improve this documentation