16:32
I’ve switched from Hugo + Github Page to Astro + Cloudflare.
Astro
What I like about Astro so far:
- more programmer-friendly
- in-depth tutorial for project setup
- less file generation at build
I’ve stopped at this step: https://docs.astro.build/en/tutorial/6-islands/4/ Done!
Cloudflare
I’m using Cloudflare to:
- registered a custom domain
- host the build from Github
- Yay now I have a website on a custom domain!
Steps:
- Register a custom domain from Cloudflare Registrar
- Follow the steps for Deploy your Astro Site to Cloudflare
- On Cloudflare Worker page, add your custom domain
20:45
Decided to use Cloudflare D1 for implementing the commenting system, because:
- it’s free! and easy to set up!
- they have a nice tutorial for building comments api!
Fingers crossed!
20:53
npx wrangler d1 create topfuelbread-db
npx wrangler d1 execute topfuelbread-db --remote --file schema.sql
npx wrangler d1 execute topfuelbread-db --remote --command "SELECT name FROM sqlite_schema WHERE type ='table'"
npx wrangler deploy
21:14
DB and APIs are all setup…
but Astro also has DB!
https://docs.astro.build/en/guides/astro-db/
21:42
Ugh I don’t want to maintain backend… This is out of my paygrade.
For commenting system, I will be using giscus which is a github discussion fueld, since I realized that I don’t need to make my frontend repo public, but create a new public repo to store comments.