mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
Created CLAUDE.md for Claude Code instructions and .claude/skills/ directory with frontmatter, convex, and sync skill files. Updated sync-discovery-files.ts to auto-update CLAUDE.md during sync.
4.2 KiB
4.2 KiB
Frontmatter skill
How to write frontmatter for markdown-blog posts and pages.
Blog post frontmatter
Location: content/blog/*.md
Required fields
| Field | Type | Description |
|---|---|---|
| title | string | Post title |
| description | string | SEO description |
| date | string | YYYY-MM-DD format |
| slug | string | URL path (must be unique) |
| published | boolean | true to show publicly |
| tags | string[] | Array of topic tags |
Optional fields
| Field | Type | Default | Description |
|---|---|---|---|
| featured | boolean | false | Show in featured section |
| featuredOrder | number | - | Display order (lower = first) |
| image | string | - | OG/header image path |
| showImageAtTop | boolean | false | Display image at top of post |
| excerpt | string | - | Short text for card view |
| readTime | string | auto | Reading time (auto-calculated if omitted) |
| authorName | string | - | Author display name |
| authorImage | string | - | Author avatar URL (round) |
| layout | string | - | "sidebar" for docs-style layout |
| rightSidebar | boolean | true | Show right sidebar |
| aiChat | boolean | false | Enable AI chat in sidebar |
| blogFeatured | boolean | false | Hero featured on /blog page |
| newsletter | boolean | - | Override newsletter signup |
| contactForm | boolean | false | Enable contact form |
| showFooter | boolean | - | Override footer display |
| footer | string | - | Custom footer markdown |
| showSocialFooter | boolean | - | Override social footer |
Example blog post
---
title: "How to write a blog post"
description: "A guide to writing posts with frontmatter"
date: "2025-01-15"
slug: "how-to-write-a-blog-post"
published: true
tags: ["tutorial", "markdown"]
featured: true
featuredOrder: 1
image: "/images/my-post.png"
excerpt: "Learn how to create blog posts"
authorName: "Your Name"
authorImage: "/images/authors/you.png"
---
Your content here...
Page frontmatter
Location: content/pages/*.md
Required fields
| Field | Type | Description |
|---|---|---|
| title | string | Page title |
| slug | string | URL path (must be unique) |
| published | boolean | true to show publicly |
Optional fields
| Field | Type | Default | Description |
|---|---|---|---|
| order | number | - | Nav order (lower = first) |
| showInNav | boolean | true | Show in navigation menu |
| featured | boolean | false | Show in featured section |
| featuredOrder | number | - | Display order (lower = first) |
| image | string | - | Thumbnail/OG image for cards |
| showImageAtTop | boolean | false | Display image at top |
| excerpt | string | - | Short text for card view |
| authorName | string | - | Author display name |
| authorImage | string | - | Author avatar URL |
| layout | string | - | "sidebar" for docs-style |
| rightSidebar | boolean | true | Show right sidebar |
| aiChat | boolean | false | Enable AI chat |
| contactForm | boolean | false | Enable contact form |
| newsletter | boolean | - | Override newsletter signup |
| textAlign | string | "left" | "left", "center", "right" |
| showFooter | boolean | - | Override footer display |
| footer | string | - | Custom footer markdown |
| showSocialFooter | boolean | - | Override social footer |
Example page
---
title: "About"
slug: "about"
published: true
order: 1
showInNav: true
featured: true
featuredOrder: 2
excerpt: "Learn about this site"
---
Page content here...
Common patterns
Featured post on homepage
featured: true
featuredOrder: 1 # Lower numbers appear first
Hero post on /blog page
blogFeatured: true
image: "/images/hero.png"
Docs-style page with sidebar
layout: "sidebar"
rightSidebar: true
Hide from navigation
showInNav: false
Enable contact form
contactForm: true
Custom footer content
showFooter: true
footer: "Custom footer text in **markdown**"
Validation
The sync script validates:
- Required fields must be present
slugmust be unique across all posts/pagesdateshould be YYYY-MM-DD formatpublishedmust be boolean
Missing required fields will cause the file to be skipped with a warning.