Building This Site: How It's Put Together
Tech choices, directory structure, and deployment, all in one post.
First post: a write-up of how this site itself is built.
Why self-host
The reasons are practical:
- Platform accounts aren’t under my control; content only truly belongs to me when it lives under my own domain;
- Everything is just a pile of Markdown files, so migration, backups, and version control are all a single
gitcommand away; - It doubles as a playground: if I want a new feature, I just change the code.
Tech choices
The site is built with Astro, for three reasons:
- Writing is just writing Markdown – posts live in
src/content/blog/, one file per post, with frontmatter defining the metadata; - Zero JavaScript by default – the output is pure static HTML, and Lighthouse performance scores are essentially perfect;
- Extend on demand – if I want comments or search later, I can pull in the corresponding integration then, instead of carrying a whole framework from day one.
RSS and the sitemap are generated automatically by the official integrations; no manual upkeep needed.
Deployment
The static build is deployed on Cloudflare: git push triggers a build, the output is distributed to a global CDN, and a personal site’s traffic stays within the free tier. DNS for the domain is hosted in the same place, with certificates renewing automatically.
What’s next
This site will keep collecting technical notes and project retrospectives, mostly about the real problems of building products: architecture trade-offs, App Store submission, and the pitfalls I’ve hit along the way.