docsite

ewan March 21, 2026
Source

docsite is the source code for docs.ewancroft.uk โ€” the central documentation hub for ewan's projects. It's a static SvelteKit site with a terminal-inspired aesthetic, driven by local Markdown files and published to the AT Protocol via Sequoia.

How It Works

Documentation is written as Markdown files in src/content/documentation/. Each file's frontmatter (title, description, date, tags, draft) is parsed at build time using gray-matter. The site lists all non-draft posts sorted by date and renders them via a Unified/remark/rehype pipeline with GFM support and heading id attributes for anchor links.

Posts are also published as site.standard.document records on the AT Protocol PDS via Sequoia, making them part of the standard.site ecosystem. The sequoia.json config at the repo root wires the content directory, output directory, and publication record together.

Routes

Route Description
/ Landing page with a brief intro and quick links
/projects Index of all non-draft documentation posts, sorted by date
/projects/[slug] Individual documentation page with rendered Markdown and table of contents

Quick Start

Edit .env:

Add Markdown files to src/content/documentation/, then:

Adding Documentation

Create a .md file in src/content/documentation/:

  • draft: true hides the post from the index and all routes
  • date is used for sorting โ€” ISO YYYY-MM-DD format
  • The filename (without extension) becomes the URL slug at /projects/[slug]

Sequoia Publishing

sequoia.json at the repo root configures the Sequoia CLI:

Running sequoia publish syncs local Markdown files to site.standard.document records on the PDS, making them accessible to any Standard.site-compatible reader.

Environment Variables

Variable Required Description
PUBLIC_SITE_TITLE Yes Site title used in and OG/Twitter metatags</td> </tr> <tr> <td>PUBLIC_SITE_DESCRIPTION</td> <td>Yes</td> <td>Site description used in metatags</td> </tr> <tr> <td>PUBLIC_SITE_URL</td> <td>Yes</td> <td>Canonical URL used in OG/Twitter metatags</td> </tr> <tr> <td>PUBLIC_AP_INSTANCE_URL</td> <td>No</td> <td>Full URL of your ActivityPub instance (e.g. <a href="https://ap.example.com">https://ap.example.com</a>)</td> </tr> <tr> <td>PUBLIC_AP_USERNAME</td> <td>No</td> <td>Your username on the AP instance</td> </tr> </tbody></table> <p>When both AP vars are set, a fediverse:creator metatag is injected into every page. The tag is omitted entirely if either var is absent.</p> <p>Tech Stack</p> <p>SvelteKit 2.50+ with Svelte 5, Tailwind CSS 4, TypeScript 5.9+, Vite 7. Markdown rendering via Unified, remark-parse, remark-gfm, remark-rehype, rehype-slug, and rehype-stringify. Deployed on Vercel via @sveltejs/adapter-vercel.</p>

Discussion in the ATmosphere

Loading comments...