itsryan.me

Writing

How this site works

This site is a custom static site generator built with Bun and TypeScript. I wanted to understand every line of code on my site … well, nearly everything.I’m not a SWE by trade. With the advent of LLMs, I’m able to adopt Robin Sloan’s “Home cooked app” ethos Most frameworks are black boxes and annoying. I saw Justin Duke’s setup and thought: I can do that.

Stack

  • Bun: Replaces Node, npm, and webpack. Fast.
  • TypeScript: Types keep me honest.
  • Plain CSS: One small stylesheet, inlined into every page.
  • Markdown-It: Markdown → HTML.

No React. No hydration. No 500kb JavaScript bundles. Just HTML and CSS.

Build

Everything happens in src/build.ts. One file, top to bottom:

  1. Read markdown files from content/
  2. Extract frontmatter (title, date, ratings)
  3. Process markdown with custom rules:
    • Wikilinks: [[Page Name]] becomes internal links1
    • Footnotes: becomes expandable inline notes
  4. Find backlinks by scanning who links to whom
  5. Generate HTML using template strings
  6. Write to dist/

That’s it. No bundler, no magic.

Speed

The whole site builds in under a second:

$ bun run build
📍 Building Ryan's Blog...
✅ Build Complete!

I edit a file, run build, it’s done. No webpack. No dev server.Most of the time, I don’t even run a build as I use Obsidian with a Git plugin, so commits happen automatically when I save.