← Projects

This site's publishing setup

Astro content collections, Sveltia editing, downloadable source files, Pagefind search, and build checks.

This site builds Markdown into static pages with Astro. Articles, projects, and scripts use shared templates. Cloudflare Pages serves the generated files.

Content and downloads

The three content collections hold article text, project notes, and script documentation. A script entry points to a source file under src/library.

The page and download use that same file. Editing the script updates both during the next build.

Draft entries are excluded from pages and generated downloads. Future-dated articles remain unpublished until a build runs after their publication date. The date alone does not trigger a deployment.

Search and editing

Pagefind builds a search index from the generated HTML. Search runs in the reader’s browser.

The locally served Sveltia CMS configuration describes the editable fields. It writes review branches and pull requests to GitHub; connecting the Cloudflare OAuth authenticator is separate from serving the static site. Readers do not need access to the authoring repository.

Build checks

The build validates metadata, generates pages and downloads, and creates the search index. Additional checks cover internal links, publication exclusions, and source-file paths.

Browser checks cover navigation, search, filters, downloads, code copying, color themes, and mobile overflow. Accessibility checks run against the rendered pages.

Repository links use a saved metadata snapshot. Forks retain their upstream links, and the collection shows when that snapshot was taken.

Deployment

Wrangler uploads the built dist directory to the existing Cloudflare Pages project. The deployment includes redirects and response headers.

The workbench contains the reusable scripts and a small CI example. The writing archive uses the same content system.

Technologies: Astro, Sveltia CMS, Pagefind, Expressive Code, Cloudflare Pages.

Related code