Skip to content
Mac Long

Web Platform

Building this site with Astro

Static pages built with Astro, served by Caddy from my personal homelab.

· 3 min read
AstroCaddyHomelab
An index card for Astro content collections and static pages served by Caddy.

A website on my own server

This portfolio runs on the Mac I use as a personal homelab. Astro builds the pages, Caddy serves the files, and a tunnel connects the local server to the public domain. The application lives on my machine; the tunnel is its route to the web.

The source is on GitHub. The server setup lives in Configuration, alongside the other tools and services running on the host.

Content stays in files

Logs are Markdown files with checked frontmatter. Astro’s content collections turn them into the archive, homepage entries and individual pages at build time. A new Log is a content change, rather than another page template to maintain.

Recipes follow the same approach. Each recipe has one canonical Cooklang file containing its ingredients, method and optional pairings. The recipe pages and searchable index are generated from those files. The raw files stay outside the public directory.

Alpine.js adds small interactions such as search, filtering and the theme toggle. Recipe pages also have ingredient checkboxes, progress tracking and quantity scaling. The content is already in the HTML; those controls improve how it is used.

Build with Astro, serve with Caddy

The build command is straightforward:

mise run build

Astro writes the static site to dist-caddy/. Caddy serves that directory, rather than the repository, so source files and local configuration stay private. Its hostname routing keeps the portfolio alongside the other homelab services.

Caddy’s configuration and the tunnel ingress are versioned in Configuration. The deployment task builds the site and reloads that existing Caddy service:

mise run deploy

There is no application server to keep alive for these pages. Updating a recipe, Log or project means changing its source, checking the build and publishing the result on the homelab.