← Back to blog

How to write a post on this site

  • Reference

This post doubles as a template. Every blog entry is a markdown file in src/content/blog/ with a small block of frontmatter at the top.

Frontmatter fields

FieldRequiredNotes
titleyesShown as the heading and in the browser tab
descriptionyesOne-line summary used on cards and for SEO
pubDateyesYYYY-MM-DD
updatedDatenoShows an “updated” note
tagsnoArray of strings
covernoPath under /public, e.g. /img/portfolio/scroll.jpg
draftnotrue hides the post from the site

Formatting

Standard markdown works — bold, italic, links, lists, tables, blockquotes and code blocks:

Keep it simple.

console.log("code blocks are supported too");

To hide a work-in-progress post, set draft: true in the frontmatter and it won’t be built or listed.