Personal site and blog. Astro 6, deployed to Cloudflare Workers via
@astrojs/cloudflare.
This repo is mirrored at https://github.com/ncrmro/website and https://git.ncrmro.com/ncrmro/website.
- Framework: Astro 6 (server output, prerendered routes)
- Adapter:
@astrojs/cloudflare→ Workers - Content: MDX in
src/content/blog/, validated by a Zod schema insrc/content.config.ts - Styling: Tailwind 4 via the
@tailwindcss/viteplugin - Media: Tracked in
public/posts/<slug>/media/with Git LFS for binaries (rules in.gitattributes)
.
├── src/
│ ├── content/blog/ MDX posts
│ ├── content.config.ts Blog Zod schema
│ ├── pages/ Routes
│ ├── layouts/ Page shells
│ └── components/
├── public/posts/<slug>/media/ Post images (LFS)
├── db/ Drizzle schema (inert scaffolding; see below)
├── drizzle/ SQL migrations (inert scaffolding)
├── drizzle.config.ts
├── astro.config.mjs
├── wrangler.jsonc
└── flake.nix Nix dev shell
Run inside the Nix dev shell (nix develop or via direnv).
| Command | Action |
|---|---|
bun install |
Install dependencies |
bun run dev |
Astro dev server (localhost:4321) |
bun run build |
Build to ./dist/ |
bun run preview |
Build + local preview |
bun run deploy |
Build + wrangler deploy |
bun run db:migrate |
Apply Drizzle migrations (Turso) |
db/ and drizzle/ are kept as inert scaffolding from a previous
Drizzle/Turso integration. There's no live DB and no application code
reads from db/schema*.ts today. To revive:
- Add a libsql client wherever it's needed (Astro endpoint, etc).
- Set
TURSO_DATABASE_URLandTURSO_AUTH_TOKENenv vars. - Run
bun run db:migrate. The Drizzle config switches between Turso and a local sqlite/libsql URL depending onTURSO_AUTH_TOKEN.
The Deploy GitHub Actions workflow already runs bun run db:migrate
before the worker deploy, so production migrations are wired up as soon
as the env secrets are populated.
- CI:
.github/workflows/deploy.ymldeploys on push tomain;.github/workflows/preview.ymlpublishes a versioned Cloudflare alias per PR and comments the URL;.github/workflows/validate.ymlruns a fork-safeastro buildon every PR. - Worker:
ncrmro-website(seewrangler.jsonc). - Live: https://ncrmro-website.ncrmro.workers.dev/
Required repo configuration:
- Secret
CLOUDFLARE_API_TOKEN(Workers Scripts:Edit) - Variable
CLOUDFLARE_ACCOUNT_ID - Environment
production(used bydeploy.yml) - Optional secrets
TURSO_DATABASE_URL,TURSO_AUTH_TOKEN(only needed when the DB is revived)
The Astro scaffold started from the Bear Blog starter.