vinibrsl/vinibrasil.com

๐Ÿ‘‹ Hello, World!

โ˜… 0Forks 0AstroGitHub โ†—Compare

README

Vinicius Brasil โ€” blog

My personal blog: short notes on big ideas, code, and a curious life. Static, fast, and minimal โ€” built with Astro, written in Markdown, and deployed to Cloudflare Workers.

Live at vinibrasil.com.

Screenshot of the blog homepage

Stack

  • Astro v5 โ€” static output, near-zero client JS
  • Markdown / MDX posts in src/content/blog/, validated by a type-safe schema
  • Shiki syntax highlighting and Mermaid diagrams rendered at build time
  • Departure Mono + Newsreader, a single retro-blue accent, warm paper theme
  • Auto-generated Open Graph cards (scripts/generate-og.mjs), RSS (/rss.xml), and sitemap
  • LLM-ready: an /llms.txt index, /llms-full.txt, and a clean Markdown twin of every post at /<slug>.md (see src/lib/posts.ts)
  • Served as pure Cloudflare Static Assets (no Worker, zero compute); www โ†’ apex is a Cloudflare Redirect Rule

Develop

npm install
npm run dev      # http://localhost:4321
npm run build    # generates OG cards, then builds to dist/
npm run preview  # serve the build locally

Writing a post

Add a Markdown (or MDX) file to src/content/blog/. The filename becomes the URL slug (my-post.md โ†’ /my-post/). Frontmatter:

---
title: "My post"
description: "One-line summary, used for SEO and the RSS feed."
pubDate: 2026-06-14
updatedDate: 2026-06-20   # optional
tags: ["software"]        # optional
draft: false              # optional; drafts are excluded from build
---

Editing pages

Edit src/content/pages/home.md for the home-page intro. Add books to src/content/pages/reading.md and trips to src/content/pages/travel.md. Use year headings and Markdown list items. Put a note or photo on an indented line below an item. The same files supply the HTML pages, the .md downloads, and /llms-full.txt.

Deploy (Cloudflare Workers)

Pushes to main deploy automatically via Cloudflare Workers Builds (Git integration). CI runs npm run build:ci (astro build only โ€” no Playwright) and deploys with npx wrangler deploy; config lives in wrangler.jsonc.

To deploy by hand instead:

npm run deploy   # npm run build && wrangler deploy

The build is served directly from Cloudflare Static Assets โ€” there's no Worker script, so requests incur no compute. The www โ†’ apex 301 is handled by a Cloudflare Redirect Rule at the edge. Routes (apex + www) are bound in wrangler.jsonc and require vinibrasil.com to be an active zone in the Cloudflare account.

Open Graph cards

The CI build does not run Playwright, so the generated cards in public/og/ are committed to the repo. A pre-commit hook (in .githooks/, wired up by npm install's prepare script) regenerates and stages them automatically whenever a commit touches src/content/blog/, the fonts, or the generator. Regenerate manually any time with npm run og.

Fonts

Departure Mono is licensed under the SIL Open Font License; see public/fonts/DepartureMono-LICENSE.txt.

Contributors

vinibrsl

Issues