✨ Publier v1 is live — a polished docs platform built for the open web.
Skip to content

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

Terminal window
publier new my-blog --template blog

Directory layout

my-blog/
src/
content/
blog/ # MDX posts → /blog/<slug>
my-first-post.mdx
publier.config.yaml
theme.yaml
astro.config.ts
content.config.ts

Publier auto-provides:

  • /blog/ — post listing page
  • /blog/<slug> — individual post route (one per .mdx file)
  • /blog/rss.xml — RSS feed (auto-generated from the collection)

astro.config.ts

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

src/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

publier.config.yaml
name: My Blog
url: https://blog.example.com
favicon: /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: false

Blog frontmatter (blogSchema)

FieldTypeDefaultDescription
titlestringrequiredPost title.
datestring | DaterequiredPublish date — ISO string or Date object; coerced to Date.
descriptionstringundefinedShort description for listings, OG tags, and RSS.
updatedstring | DateundefinedLast-updated date for “last modified” display.
authorstringundefinedAuthor name. Multi-author: comma-separated string.
tagsstring[]undefinedTags for filtering and tag-page generation.
imagestringundefinedHero image URL for OG and post header.
imageAltstringundefinedAlt text for the hero image. Required when image is set.
draftbooleanfalseExcluded from production builds; still served in publier dev.
excerptstringundefinedManual excerpt override; auto-generated from the first paragraph if omitted.

Example post

src/content/blog/ship-v1.mdx
---
title: Publier v1 is live
description: What we built, what we learned, and what's next.
date: 2026-04-15
author: The Team
tags: [release, announcement]
image: /images/v1-hero.png
imageAlt: 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.