feat: add sidebar layout support for blog posts

- Add layout field to posts schema and frontmatter
- Enable docs-style sidebar layout for posts (previously pages only)
- Update Post.tsx to handle sidebar for both posts and pages
- Add layout field to Write.tsx frontmatter reference
- Update documentation in docs.md, setup-guide.md, how-to-publish.md
- Add documentation links to README.md
This commit is contained in:
Wayne Sutton
2025-12-23 00:57:21 -08:00
parent edb7fc6723
commit 0342539aac
18 changed files with 244 additions and 338 deletions

View File

@@ -36,6 +36,7 @@ interface PostFrontmatter {
featuredOrder?: number; // Order in featured section (lower = first)
authorName?: string; // Author display name
authorImage?: string; // Author avatar image URL (round)
layout?: string; // Layout type: "sidebar" for docs-style layout
}
interface ParsedPost {
@@ -53,6 +54,7 @@ interface ParsedPost {
featuredOrder?: number; // Order in featured section (lower = first)
authorName?: string; // Author display name
authorImage?: string; // Author avatar image URL (round)
layout?: string; // Layout type: "sidebar" for docs-style layout
}
// Page frontmatter (for static pages like About, Projects, Contact)
@@ -122,6 +124,7 @@ function parseMarkdownFile(filePath: string): ParsedPost | null {
featuredOrder: frontmatter.featuredOrder, // Order in featured section
authorName: frontmatter.authorName, // Author display name
authorImage: frontmatter.authorImage, // Author avatar image URL
layout: frontmatter.layout, // Layout type: "sidebar" for docs-style layout
};
} catch (error) {
console.error(`Error parsing ${filePath}:`, error);