Docs (experimental, WIP)

The Val Town docs, built in Val Town. Prior art: the Val Town blog, hosted in Val Town.

How it works

  • Markdown files for each docs page are stored in the /pages directory
  • A Hono router in index.tsx traverses that directory^ to serve each page
  • Markdown files are parsed using marked and gray-matter
  • All pages are SSR'd using hono/jsx to return static HTML
  • React components live in /components. Nav.tsx also traverses /pages to construct the sidebar
  • Pages are styled with vanilla CSS in /styles/index.css
  • Images are uploaded via drag and drop in /images

TODO

  • Migrate all content from docs.val.town
  • Table of Contents (for each page)
  • Search
  • Syntax highlighting for code blocks
  • Sidebar ordering
  • Copy as markdown
  • Open in Claude/ChatGPT
  • Edit in VT button
  • Caching on Cloudflare CDN
  • Favicon