Blog
Rendering code cleanly in articles
A short sample article that verifies Markdown code fences and syntax highlighting in 11ty.
Articles can include normal Markdown content and code. Highlighting runs at build time, not in the browser.
export function total(items) {
return items.reduce((sum, item) => sum + item.amount, 0);
}
Shell examples remain readable too.
npm run build
npm run dev
Diff examples are prepared as well.
+export const status = "published";
-export const status = "draft";