Content Management
On this page
The content management system is centered around these core modules:
- ContentManager (
core/lib/content/content-manager.js
): Orchestrates all content-related operations - ContentItemManager (
core/lib/content/modules/content-item-manager.js
): Handles CRUD operations for content items (posts and pages) - ContentQueryManager (
core/lib/content/modules/content-query-manager.js
): Manages content queries, filtering, and retrieval - Utility functions (
core/lib/content/utils/
): Validates and transforms content.
The CMS stores content as Markdown files with YAML frontmatter for metadata.
Architecture Overview
Content Manager
├── Content Item Manager # CRUD operations
├── Content Query Manager # Querying and filtering
└── Content Utils # Utility functions
Content Types
1. Posts
Data folder: content/data/posts/
- Blog entries with metadata
- Support for categories and tags
- Related posts functionality
- SEO fields and featured images
2. Pages
Data folder: content/data/pages/
- Static content pages
- Navigation and hierarch support
- Custom page types
3. Custom Pages
Data folder: content/data/custom/
- Template-driven pages
- Nested page structure
- Parent-child relationships
- Custom template resolution
Frontmatter Schema
---
id: "unique-identifier" # Generated upon creation in editor (required)
title: "Content Title" # Given title (required)
subtitle: "Optional subtitle" # Given subtitle
slug: "url-friendly-slug" # Generated from title in editor
status: "published" | "draft" # Chosen publishing status
author: "author-name"
createdAt: "2025-05-20T08:31:06.365Z" # Generated upon creation in editor
updatedAt: "2025-05-20T08:54:33.333Z" # Updated with modifications from editor
publishDate: "2025-05-20T11:30" # Generated upon creation in edior (modifiable)
seoDescription: "SEO meta description"
excerpt: "Content preview"
category: "category-name" # Posts only
tags: ["tag1", "tag2"] # Posts only
relatedPosts: ["post-id-1"] # Posts only
featuredImage: # Optional
id: "image-id"
url: "/images/featured.jpg"
alt: "Image description"
caption: "Image caption"
pageType: "normal" | "custom" # Pages only
parentPage: "parent-slug" # Custom pages only
---
Content Processing Pipeline
- Parse Markdown: Extract frontmatter and content
- Validate: Check required fields and data types
- Transform: Apply slugification and formatting
- Index: Update internal indexes
- Cache: Store in memory cache if needed