A modern web framework optimized for content-driven sites — ships zero JavaScript by default, supports content collections, MDX, and static site generation.
Astro is a web framework for building content-driven websites. It distinguishes itself with a focus on shipping zero JavaScript by default, a “components from any framework” philosophy, and first-class support for content sites via Content Collections. It’s the framework this site is built on.
For sites like this one, Astro hits a sweet spot:
The killer feature for a knowledge site. Define a schema once:
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
const concepts = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/concepts' }),
schema: z.object({
title: z.string(),
date: z.coerce.date(),
tags: z.array(z.string()).default([]),
related: z.array(z.string()).default([]),
// ... any fields you want
}),
});
export const collections = { concepts };
Then write your content in src/content/concepts/<slug>.md with matching frontmatter. Astro gives you fully-typed access to every field at build time.
Astro is well-suited for the Karpathy LLM Wiki pattern:
This site has a graph view (D3 force layout) that shows the network of article relationships. It’s the only JavaScript that ships in most pages. Built as a single Astro island — static on the server, interactive in the browser.
This site uses Fuse.js for client-side fuzzy search. The search index is generated at build time by walking all content collections and serializing {title, description, tags, body} to /search-index.json. Loaded on demand when the user opens the search modal. No backend, no rate limits, no third-party service.
| Tool | Strength | Trade-off |
|---|---|---|
| Astro | Static + islands, content-first | Less for pure apps |
| Next.js | Full-stack React, RSC | Heavier, more JS by default |
| Hugo | Pure static, very fast | Templating is less ergonomic |
| Jekyll | Mature, Ruby | Slow builds, dated |
| Quartz | Obsidian-native | Less flexible, less control |
| Docusaurus | Docs-focused | Designed for documentation, not encyclopedias |
For a personal knowledge base or digital garden, Astro is the strongest option in 2024.