Public
docs.val.town - The official Val Town docs, built on Val Town
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

docs.val.town

The Val Town documentation site, written and hosted on Val Town.

If you're curious why we did this, and where the tradeoffs lie, read Docfooding: Eating our own documentation

Stack

Hono

This app is server-rendered using Hono. Pages are cached for 5 minutes using Hono's cache middleware, which uses the Web Standard Cache API. (Skips caching on branches other than main.)

CSS

Vanilla CSS in base.css and colocated Component.css files in /components. Served as one /styles.css file from Hono router in index.tsx -- linked in <head> of Layout.tsx. A couple recent(ish) CSS features we use:

  • color-mix(), Baseline since May 2023
  • CSS nesting, Baseline since December 2023

We considered but did not use @scope, which only became Baseline in December 2025.

Client-side JavaScript

Components use old fashioned <script> tags for interactivity, like:

  • Search via cmd+k (lazy-loaded MiniSearch index)
  • Sidebar uses localStorage to remember expanded/hidden state
  • Sidebar scrolls itself to the current page, opening any collapsed sections above it
  • Copy page as markdown
  • Copyable code snippets

While the site works with JavaScript disabled as a fully server rendered site, it also has client-side navigation as a progressive enhancement in Router.tsx. Links are prefetched on hover.

Markdown content

The content itself is written in Markdown files in the /pages directory. Frontmatter for each page includes title, description, and updated date (helpful for both humans and agents). Adding a page does not automatically add it to the sidebar navigation -- that's explicit in /components/SIDEBAR.ts.

The cmd+k search bar lazy loads a search index built using MiniSearch.

Colophon

Doodles

All hand drawn by our team, namely Jackson.

  1. Green for internal docs pages
  2. Blue for val.town and val.run URLs
  3. Orange for external pages

Typography

We use Sprig Sans (by Faire Type) for prose and iA Writer Mono (by iA) for code.

Page titles and navigation sidebar labels are sentence-cased.