Creating a New Page
Page Structure
Pages are defined with this structure (types.ts:194-201):
Page URLs
Pages are accessible at:/p/{slug}
Example: A page with slug el-metodo is available at /p/el-metodo
Section Types
The page builder supports 14 section types (types.ts:182-192):
Text
Rich text content with Markdown support
Image
Single image with caption and alt text
Gallery
Multi-image gallery with lightbox
Stats
Key metrics with icons and values
Cards
Feature cards in grid layout
IconGrid
Icon-based feature grid
Hero
Large hero section with image/video background
Video
Embedded video player (YouTube, Vimeo)
CTA
Call-to-action banner with button
Accordion
Collapsible FAQ or content sections
ResourcesGrid
Grid of downloadable resources
EventsCalendar
Upcoming events calendar view
Timeline
Chronological timeline layout
MethodPillars
Special layout for CAFH method pillars
Section Configuration
Each section has a flexible configuration object (types.ts:182-192):
Example: Hero Section
Example: Stats Section
Text Section with Markdown
The Text section supports full Markdown syntax:Markdown is rendered using the CommonMark specification with GitHub-flavored extensions.
Reordering Sections
Sections can be reordered in two ways:- Drag and Drop: Use the grip handles to drag sections into new positions
- Order Property: Manually edit the
ordernumber in section settings
Section Settings
Each section supports optional styling settings:Background Color
Set a hex color code for the section background:Padding
Control vertical spacing:small: 2rem (32px)medium: 4rem (64px)large: 6rem (96px)
Container Size
Control content width:narrow: 800px max-width (for reading)standard: 1200px max-width (default)full: 100% width (for hero sections)
Linking to Other Pages
You can link to other content using these URL patterns:| Link Type | URL Format | Example |
|---|---|---|
| Custom Page | /p/{slug} | /p/quienes-somos |
| Blog Post | /blog/{id} | /blog/post_1 |
| Static Route | /{path} | /about or /contact |
| Event | /activities/{id} | /activities/ev_123 |
| External | https://... | https://cafh.org |
SEO Best Practices
Page Title
Page Title
- Keep under 60 characters
- Include primary keyword
- Make unique and descriptive
- Format:
Page Name | Site Name
Meta Description
Meta Description
- Write 150-160 characters
- Include call-to-action
- Use active voice
- Don’t duplicate the title
Keywords
Keywords
- Choose 5-10 relevant keywords
- Include variations and synonyms
- Research using Google Search Console
- Match user intent
Open Graph Image
Open Graph Image
- Use 1200x630px (Facebook/LinkedIn standard)
- Include text overlay if relevant
- Keep file size under 1MB
- Use high-contrast colors
Saving and Publishing
Page operations are tracked in change logs (storage.ts:533-552):
Default Pages
The platform ships with 6 default pages (storage.ts:123-283):
- Quiénes Somos (
/p/quienes-somos): Organization overview - El Método (
/p/el-metodo): Spiritual method explanation - Biblioteca de Recursos (
/p/biblioteca-recursos): Resource library - Actividades y Retiros (
/p/actividades-retiros): Events calendar - Nuestra Historia (
/p/nuestra-historia): Organization history - Misión y Visión (
/p/mision-y-vision): Mission statement
Deleting Pages
Storage and Performance
Pages are stored inlocalStorage under key cafh_pages_v1 (storage.ts:525-552):
- Maximum storage: ~10MB total (browser dependent)
- Each page with many sections: ~10-50KB
- Recommended: 50-100 pages maximum
For sites with hundreds of pages, consider migrating to a database backend.
Related Documentation
CMS Overview
Complete CMS system documentation
Blog Management
Manage blog posts and articles
Media Library
Upload and organize media files