feat: blog view toggle, page sidebar layout, and collapsible markdown

- Blog page: list/card view toggle with localStorage persistence
- Pages: sidebar layout with auto-generated TOC (layout: "sidebar")
- Markdown: collapsible sections via <details>/<summary> tags
- Add rehype-raw and rehype-sanitize for HTML in markdown
This commit is contained in:
Wayne Sutton
2025-12-23 00:21:57 -08:00
parent d47062bb32
commit edb7fc6723
31 changed files with 1912 additions and 178 deletions

View File

@@ -67,6 +67,7 @@ interface PageFrontmatter {
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 ParsedPage {
@@ -81,6 +82,7 @@ interface ParsedPage {
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
}
// Calculate reading time based on word count
@@ -169,6 +171,7 @@ function parsePageFile(filePath: string): ParsedPage | 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 page ${filePath}:`, error);