The Blogcraft Content Pipeline
Blogcraft transforms your MDX content into beautifully typeset, zero-JavaScript pages. Every component on this page renders at build time — no client-side framework needed.
Architecture Overview
Here is how content flows through the Blogcraft build pipeline:
Code Highlighting
Blogcraft uses Expressive Code for syntax highlighting with dual light/dark themes.
TypeScript with Line Highlighting
import { defineCollection, z } from 'astro:content';import { glob } from 'astro/loaders';
const blog = defineCollection({ loader: glob({ pattern: '**/*.mdx', base: './src/content/blog' }), schema: ({ image }) => z.object({ title: z.string().max(100), description: z.string().max(300), pubDate: z.coerce.date(), }),});
export const collections = { blog };Terminal Commands
pnpm add astro-expressive-code@^0.41.7pnpm buildInsert and Delete Markers
const old = 'removed line';const replacement = 'added line';console.log(replacement);Getting Started
pnpm create astro@latestpnpm add astro-expressive-codenpm create astro@latestnpm install astro-expressive-codeyarn create astroyarn add astro-expressive-codeBehind the Scenes
How does the reading progress bar work?
The reading progress bar uses CSS animation-timeline: scroll() — a pure CSS solution that requires zero JavaScript. It animates a thin teal bar from width: 0 to width: 100% as the user scrolls down the page. Browsers that don’t support scroll-timeline gracefully degrade to an invisible bar.
How are Mermaid diagrams rendered?
Mermaid code fences are converted to inline SVG at build time using rehype-mermaid and Playwright’s headless Chromium. This means zero client-side JavaScript for diagrams — the SVG is embedded directly in the HTML output.
Framework Comparison
| Feature | Blogcraft (Astro) | Next.js Blog | Hugo |
|---|---|---|---|
| Zero JS by default | ✓ | ✗ | ✓ |
| MDX Components | ✓ | ✓ | ✗ |
| Build-time Mermaid | ✓ | ✗ | ✗ |
| React Islands | ✓ | ✓ | ✗ |
| Edge Functions | ✓ | ✓ | ✗ |
| AI Writing Assistant | ✓ | ✗ | ✗ |
Project Timeline
Foundation & Design System
Astro 5 + React 19 + Tailwind 4 scaffold, paper aesthetic, fonts, dark mode, Cloudflare Pages deployment.
Content Spine & Static MDX
Content collections, blog post layout, Expressive Code, build-time Mermaid, 8 static MDX components.
Routing & SEO
Homepage, blog listing, tag archives, RSS, sitemap, OG images, client-side search.
Interactive MDX
Charts, code playgrounds, animations — all lazy-loaded within Lighthouse budget.
Keystatic CMS
Git-based authoring UI with schema parity checking.
AI & CI/CD
Plate editor with AI actions, GitHub Actions pipeline, Lighthouse CI gates.
Interactive Components
Blogcraft’s interactive components are React islands that hydrate lazily — charts wait until you scroll to them (client:visible), and code playgrounds load after the page is idle (client:idle). Posts that don’t use these components ship zero additional JavaScript.
Live Chart
Recharts bar chart — hydrates when you scroll here.
Framework Performance Scores
Code Playground
Edit and run code live in the browser.
Wrapping Up
Blogcraft proves that rich, author-friendly content and zero-JavaScript performance are not mutually exclusive. Every component you have seen on this page renders at build time, ships as static HTML, and works perfectly in both light and dark modes.