Learning Bytes

Series · Building Learning Bytes · part 1

Post · · 4 min

Why Notion as a CMS

How learningbytes.sheraj.org is built: Notion as the content backend, Astro as the static site generator, Cloudflare Pages for hosting.

This is the first post in the Building Learning Bytes series — a walkthrough of how this very blog is built. The stack is:

  • Notion holds all the content in two databases (Bytes + Sources)
  • Astro renders the site as static HTML at build time
  • Cloudflare Pages hosts it, connected to learningbytes.sheraj.org

No server, no runtime database, no CMS login beyond Notion itself.

The benefits

  1. Writing happens where I already write. Notion is open all day anyway.
  2. The site is just files. Static hosting is cheap, fast, and basically can’t go down.
  3. Content and presentation are decoupled. I can redesign the site without touching a single byte.

The tradeoffs

  • A new post doesn’t appear instantly — I need to trigger a rebuild (or schedule one).
  • The Notion API has rate limits, so the build script needs to paginate carefully.
  • Images stored in Notion expire after an hour. They need to be downloaded and re-hosted at build time, or the site silently breaks.

What’s next in the series

  • Part 2: wiring up the Notion fetch script
  • Part 3: layouts, typography, and the Note vs Post distinction
  • Part 4: deploying to Cloudflare Pages

If you’re building something similar, start small: a script that fetches one published byte and prints it. Don’t try to build the whole pipeline before you’ve seen one byte make the round trip.

#astro #engineering

share · x · linkedin ·