Create and manage blog posts for the Eigent website with proper frontmatter, directory structure, and asset organization.
Overview
Blog posts are stored as Markdown (.md) or MDX (.mdx) files in view/public/blog/posts/. Each post requires frontmatter metadata and follows specific organizational patterns.
Quick Start
Creating a New Blog Post
Use the generate_post.py script to create a properly formatted template:
python scripts/generate_post.py "Your Blog Title" \
--category "Tutorial" \
--author "Author Name" \
--featured
Or create manually with minimum required frontmatter:
---
title: "Your Blog Post Title"
date: "2025-01-15"
---
File Location and URL Mapping
- Create in:
view/public/blog/posts/your-post-slug.mdx - Filename: Use kebab-case (e.g.,
getting-started.mdx) - URL:
/blog/your-post-slug(filename without extension)
Frontmatter Structure
Required Fields
title(string): Blog post titledate(string): Publication date in YYYY-MM-DD format
Common Optional Fields
subtitle: Subtitle below titleauthor: Author name (default: "Eigent")authorprofile: Path to author image (e.g.,/blog/author/name.png)role: Author's role (default: "Author")description: SEO description (150-160 chars recommended)keywords: Array or comma-separated stringtoc: Enable table of contents (default: true)thumbnail: Path to thumbnail (e.g.,/blog/thumbnail/post.png)featured: Mark as featured (default: false)category: Category label (e.g., "Tutorial", "Case Study")
See frontmatter-guide.md for complete field specifications and examples.
Directory Structure
view/public/blog/
├── posts/ # .md/.mdx files
├── thumbnail/ # 1200x630px thumbnails
├── author/ # 200x200px author profiles
└── [assets]/ # Other images/videos
See directory-structure.md for detailed organization guidelines.
Content Guidelines
Markdown Features
- Use standard Markdown syntax
- Headings automatically included in TOC (if enabled)
- Code blocks support syntax highlighting
- Images:
 - Links:
[Text](https://url.com)
Image Assets
- Thumbnails: 1200x630px in
thumbnail/ - Author images: 200x200px in
author/(displayed circular) - Content images: Place in
/blog/with descriptive names - Reference with absolute paths:
/blog/asset-name.png
Best Practices
- Use kebab-case for all filenames
- Write compelling descriptions (150-160 chars for SEO)
- Include relevant keywords for discoverability
- Use consistent category names across posts
- Feature only best/most important posts
- Optimize images before uploading
- Structure content with clear headings
Workflow Steps
When creating a blog post:
- Generate template using generate_post.py script OR create file manually
- Add frontmatter with required fields (title, date) and relevant optional fields
- Write content using Markdown/MDX syntax
- Add images:
- Create thumbnail (1200x630px) in
thumbnail/ - Add author profile (200x200px) in
author/if needed - Place content images in
/blog/
- Create thumbnail (1200x630px) in
- Save to
view/public/blog/posts/[slug].mdx - Verify frontmatter formatting and image paths
- Optional: Open a PR:
- Create a branch (for example:
codex/blog-[slug]) - Commit the blog and asset changes with a clear message
- Push the branch and open a pull request for review
- Create a branch (for example:
Common Issues
Post Not Appearing
- Check file is in
view/public/blog/posts/ - Verify frontmatter YAML syntax (between
---) - Ensure required fields present (title, date)
Images Not Loading
- Verify paths start with
/blog/ - Check files exist in correct directory
- Ensure exact filename match (case-sensitive)
TOC Not Showing
- Set
toc: truein frontmatter (or omit, as true is default) - Ensure post has headings (
#,##, etc.)
Scripts
- generate_post.py: Generate blog post templates with proper structure
- Automatically creates frontmatter with defaults
- Generates URL-friendly slugs
- Supports custom categories, authors, featured status
Git Handoff (Optional)
Use this when the user asks to ship changes via GitHub:
- Create a branch with prefix
codex/. - Stage only intended blog-related files.
- Commit with a clear summary.
- Open a PR with:
- What post was added/updated
- Which assets were added/updated
- Any follow-up items (if applicable)
References
- frontmatter-guide.md: Complete frontmatter field specifications
- directory-structure.md: Asset organization and path conventions