src/content/posts/ with frontmatter that conforms to the post schema.
Schema Definition
The post schema is defined insrc/content/config.ts using Zod validation.
Fields
The title of your blog post. This will be displayed as the main heading and used in SEO metadata.
The publication date of the post in
YYYY-MM-DD format. Used for sorting posts chronologically.Example: 2025-01-12A brief summary or excerpt of the post. This appears in post listings and is used for SEO meta descriptions.
Optional array of tags or categories for the post. Useful for filtering and grouping related content.Example:
["IPO", "Grey Market Premium"]Optional canonical URL if this post was originally published elsewhere. Used to prevent duplicate content SEO issues.Example:
https://example.com/original-postExample Post File
Here’s a complete example of a blog post MDX file:src/content/posts/ipometrics.mdx
Field Requirements
| Field | Type | Required | Default |
|---|---|---|---|
title | string | Yes | - |
startDate | date | Yes | - |
description | string | Yes | - |
image | object | No | undefined |
image.url | string | Yes (if image provided) | - |
image.alt | string | Yes (if image provided) | - |
tags | string[] | No | undefined |
canonical | string | No | undefined |
Schema Comparison: Posts vs Projects
The posts schema is nearly identical to the projects schema, with one key difference:- Posts include an optional
canonicalfield for SEO purposes - Projects do not have a canonical field
title, startDate, description, image, and tags.
Usage Notes
- The
slugfield in frontmatter is used for routing but is not part of the schema validation - Dates must be in ISO format (
YYYY-MM-DD) - Images should be placed in the
public/directory and referenced with a leading slash - The
canonicalURL should be the full absolute URL including protocol (https://) - Tags are case-sensitive and will be displayed exactly as entered
- The MDX body content can include any valid MDX, including components, images, and markdown