Featured Case Study

CodeByGyan.

This site. It began as hand-written HTML — every page its own copy of the chrome — and was rebuilt as an Astro digital garden without breaking a single existing URL.

Problem

The chrome was copied into 23 files by hand.

The header, footer and command palette were duplicated on every page — 39% of the site's HTML — and drifted: footers with different link counts, a palette missing pages, two nav items highlighted at once.

Approach

Define everything once, break nothing.

Migrate to Astro with one layout owning all chrome and navigation as data — while keeping every existing .html URL alive, because the old pages were already indexed and linked.

Build

A garden, not just pages.

Content collections for notes and posts, backlinks and related-reading derived from frontmatter at build time, a knowledge graph, static full-text search with Pagefind, and a command palette to reach all of it.

Result

Static files, zero client framework.

Every page is HTML rendered at build time. The interactivity — palette, theme, search — is a single small vanilla JS file, and the whole site makes no external requests.

Results

Measured, not estimated.

Every figure here was measured on this site and is reproducible.

0external requests (fully self-hosted)
230KBtotal CSS, JS, icons and fonts
39pages built from one layout

Decisions & Tradeoffs

Every constraint here was chosen.

The site is small enough to explain completely — these are the four calls that shaped it.

Framework

Astro, rendering to plain HTML.

Components and collections at build time, zero framework shipped to the browser — a page is just HTML and one small script. Tradeoff: every interaction is hand-written vanilla JS instead of coming free from a framework.

URLs

The old .html URLs stay, deliberately.

The hand-written site's URLs were already indexed and linked, so the build is configured to emit the same shape rather than breaking every existing link for prettier paths. Tradeoff: unfashionable URLs, traded for continuity.

Search

Pagefind instead of a search service.

The index is built at deploy time and fetched only when the palette first opens — no server, no API key, no third-party request. Tradeoff: search results update only when the site rebuilds.

Relationships

Backlinks are derived, never written.

"Notes that link here" and related reading are computed from frontmatter at build time, so they cannot go stale or disagree. Tradeoff: less editorial control over what appears — the graph shows what is actually connected, not what I wish were.

What This Shows

Judgment, not just construction.

Anyone can start a site; this one shows a migration done without breaking what already worked, relationships modelled as data instead of maintained by hand, and performance claims backed by measured write-ups rather than adjectives.

01

Hand-written first

23 pages of vanilla HTML/CSS/JS — enough duplication to learn exactly why layouts exist.

02

Migrated without breakage

One Astro layout owns the chrome; every old URL still resolves.

03

Grown into a garden

Collections, derived backlinks, a knowledge graph, and static search over all of it.