Astro

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.

Core ideas

Why it’s good for personal knowledge sites

For sites like this one, Astro hits a sweet spot:

Content Collections

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.

Integrating LLMs

Astro is well-suited for the Karpathy LLM Wiki pattern:

The graph view

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.

Alternatives

ToolStrengthTrade-off
AstroStatic + islands, content-firstLess for pure apps
Next.jsFull-stack React, RSCHeavier, more JS by default
HugoPure static, very fastTemplating is less ergonomic
JekyllMature, RubySlow builds, dated
QuartzObsidian-nativeLess flexible, less control
DocusaurusDocs-focusedDesigned for documentation, not encyclopedias

For a personal knowledge base or digital garden, Astro is the strongest option in 2024.

See also