Skip to content

· 1 min read

How this site is built

Three static sites, one repo, one design system, with big files on Cloudflare R2. The whole setup and why.

This site is really three sites: a personal hub, an academic page and this blog. They share one codebase and one design. Here’s how the pieces fit together.

The layout

flowchart LR
  repo[(GitHub repo)] --> pages[Cloudflare Pages]
  pages --> main[muztahidabrar.com]
  pages --> acad[academic.muztahidabrar.com]
  pages --> blog[blog.muztahidabrar.com]
  r2[(Cloudflare R2)] --> files[files.muztahidabrar.com]
  files -. images, PDFs .-> main & acad & blog

Each site is a separate Astro app in an npm workspace. A shared @ma/ui package holds the layout, header, theme and a few components, so a change there shows up everywhere.

Where files live

The rule is simple: if it’s small and part of the page, it goes in git. If it’s big, it goes in R2.

WhatWhere
Icons, small SVG diagramsrepo (public/ or next to the post)
Photos, paper PDFs, CV, layout screenshotsR2 → files.muztahidabrar.com
VideoYouTube embed

Uploading is one command:

npm run upload -- ./photos/bench.jpg blog/2026/how-this-site-is-built
# → resizes, converts to WebP, uploads, prints the Markdown to paste

Writing posts

Posts are plain Markdown with a small header. Math works inline, like Vout=Vref(1+R1/R2)V_{out} = V_{ref}(1 + R_1/R_2), and as blocks:

PSRR(f)=20log⁡10∣vin(f)vout(f)∣\text{PSRR}(f) = 20 \log_{10}\left|\frac{v_{in}(f)}{v_{out}(f)}\right|

Code is highlighted at build time, so no JavaScript is needed to read a post:

def parallel(*rs: float) -> float:
    """Equivalent resistance of resistors in parallel."""
    return 1 / sum(1 / r for r in rs)

Why static

No server, no database and nothing to patch. The whole site is files on a CDN. If I ever change the tooling, the posts are just Markdown and move with me.