static_

Blog & collections

A collection is a folder of Markdown files in content/<name>/. Each one becomes a page and joins a listing, tag pages and an RSS feed.

content/posts/2026-01-01-hello.md   ->  /posts/hello/
---
title: Hello world
description: A short summary for search results and social cards.
date: 2026-01-01
tags: [intro, news]
image: /images/hello.jpg
draft: false
---

Write **Markdown** here.

Frontmatter: title, description, date, tags, draft, image, imageAlt, images, updated, slug, author, noindex. The date and slug come from the file name (YYYY-MM-DD-slug.md) when not in frontmatter. Drafts show in static dev and never in a build.

Configuring

"collections": {
  "posts": { "title": "Blog", "path": "blog", "perPage": 10 },
  "notes": { "title": "Notes", "path": "notes", "style": "note" }
}
option default meaning
title folder name listing heading
path folder name URL prefix
perPage 10 pagination size (0 = everything on one page)
feed true write rss.xml (needs site.url)
tags true tag pages
style article, or note for a collection named notes note = titleless, shown in full on the listing
schema BlogPosting / SocialMediaPosting JSON-LD type

Pagination

Listings and tag pages are paginated by perPage. BlogList receives a pagination object: page, pages, prevUrl, nextUrl and urls (a list of { n, url } for every page, for numbered links like 1 ... 4 5 [6] 7 ... 20). Each page gets its own URL (/blog/page/2/) and meta description.

Dates and times

Entries expose dateFormatted (1 October 2026) and timeFormatted (08:39). Both use site.timezone, an IANA name such as Europe/London (UTC when unset).

What you get

  • /blog/ listing with pagination (/blog/page/2/), tag pages (/blog/tag/intro/), /blog/rss.xml
  • JSON-LD (BlogPosting, BreadcrumbList), Open Graph article tags, previous/next links
  • Entries in sitemap.xml
  • collections.posts in any template, e.g. "latest posts" on the home page
<ul><li v-for="p in collections.posts.slice(0, 3)" :key="p.url"><a :href="p.url">{{ p.title }}</a></li></ul>

Customising

Create components/BlogPost.vue (single entry; receives post and collection) or components/BlogList.vue (listing and tag pages; receives items, heading, pagination, collection). They override the built-ins. Scaffold a post with static post "Title".