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
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.)
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.
Components use old fashioned <script> tags for interactivity, like:
- Search via cmd+k (lazy-loaded MiniSearch index)
- Sidebar uses
localStorageto 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.
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.
All hand drawn by our team, namely Jackson.
- Green for internal docs pages
- Blue for
val.townandval.runURLs - Orange for external pages
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.