Back to blog
/
2 min read

Post Metadata Reference

Basic Fields

You can find frontmatter structure in src/content.config.ts

FieldRequiredTypeExample / DefaultDescription
title✅string”My Blog Post”1-100 characters
pubDatetime✅date (z.coerce.date())“2025-03-04T16:06:19Z”
1709571979000
”March 4, 2025”
Can accept ISO 8601, timestamps, or natural date formats
description✅string”Description of my post”1-320 characters
draft❌booleanfalseIf true, post won’t be published
author❌string”truedaniyyel”Defaults to SITE.AUTHOR
modDatetime❌date (z.coerce.date())“2025-03-04T16:06:19Z”Optional modification date
image❌image / string”./images/post.png”Min size 1200×630px if provided
demoUrl❌string (URL)“https://demo.example.com”Must be a valid URL
repoUrl❌string (URL)“https://github.com/user/repo”Must be a valid URL
canonicalURL❌string (URL)“https://blog.example.com/post”Must be a valid URL
editPost❌objectSee belowPost editing configuration

editPost Object Properties

PropertyRequiredTypeExample / DefaultDescription
disabled❌booleanfalseDisable the edit button
url❌string”https://github.com/user/repo/edit/main”Edit URL
text❌string”Edit this post”Edit button text
appendFilePath❌booleantrueAppend file path to edit URL

Quick Copy Template

---
title: ''
pubDatetime: 2025-03-04
description: ''
draft: false
author: 'truedaniyyel'
# modDatetime: 2025-03-04
# image: "./images/post.png"
# demoUrl: ""
# repoUrl: ""
# canonicalURL: ""
# editPost:
# url: ""
# text: "Edit this post"
# appendFilePath: true
---