blog template
Blog and newsletter site with post listings, RSS feed, sitemap, and Pagefind-powered search.
The blog template scaffolds a content-focused blog. It’s the right choice when the primary surface is chronological posts — engineering blog, dev diary, newsletter, or release notes.
Scaffold
publier new my-blog --template blogDirectory layout
my-blog/ src/ content/ blog/ # MDX posts → /blog/<slug> my-first-post.mdx publier.config.yaml theme.yaml astro.config.ts content.config.tsPublier auto-provides:
/blog/— post listing page/blog/<slug>— individual post route (one per.mdxfile)/blog/rss.xml— RSS feed (auto-generated from the collection)
astro.config.ts
import tailwind from '@tailwindcss/vite';import { defineConfig } from 'astro/config';import { docsShell } from '@publier/shell/integration';
export default defineConfig({ integrations: [docsShell()], vite: { plugins: [tailwind()] },});docsShell() auto-wires @astrojs/mdx, @qwik.dev/astro, astro-expressive-code, and prefetch.
content.config.ts
import { defineCollection } from 'astro:content';import { blogLoader } from '@publier/shell/loaders';import { blogSchema } from '@publier/shell/schemas';
export const collections = { blog: defineCollection({ loader: blogLoader(), schema: blogSchema }),};blogLoader() reads from ./src/content/blog by default. Each .mdx filename becomes the URL slug — src/content/blog/ship-v1.mdx renders at /blog/ship-v1.
publier.config.yaml
name: My Blogurl: https://blog.example.comfavicon: /favicon.svg
nav: title: My Blog links: - label: Archive href: /blog - label: RSS href: /blog/rss.xml
search: enabled: true hotkey: k
theme: theme.yaml
pages: docs: false blog: true changelog: false status: false knowledge-base: falseBlog frontmatter (blogSchema)
| Field | Type | Default | Description |
|---|---|---|---|
title | string | required | Post title. |
date | string | Date | required | Publish date — ISO string or Date object; coerced to Date. |
description | string | undefined | Short description for listings, OG tags, and RSS. |
updated | string | Date | undefined | Last-updated date for “last modified” display. |
author | string | undefined | Author name. Multi-author: comma-separated string. |
tags | string[] | undefined | Tags for filtering and tag-page generation. |
image | string | undefined | Hero image URL for OG and post header. |
imageAlt | string | undefined | Alt text for the hero image. Required when image is set. |
draft | boolean | false | Excluded from production builds; still served in publier dev. |
excerpt | string | undefined | Manual excerpt override; auto-generated from the first paragraph if omitted. |
Example post
---title: Publier v1 is livedescription: What we built, what we learned, and what's next.date: 2026-04-15author: The Teamtags: [release, announcement]image: /images/v1-hero.pngimageAlt: Terminal showing publier build---
After six months of development, Publier v1 is live...The RSS feed URL is /blog/rss.xml — linked in the default nav.