Theme Development: Getting Started
Create custom themes for LusterCMS.
Theme Structure
themes/my-theme/
├── theme.json # Theme manifest
├── styles/
│ └── main.css # Custom styles
├── blocks/
│ └── hero.css # Block-specific styles
├── layouts/
│ └── default.json # Page templates
└── assets/
├── images/
└── fonts/
Theme Manifest
{
"name": "my-theme",
"version": "1.0.0",
"description": "A beautiful theme",
"author": "Your Name",
"preview": "preview.png",
"settings": {
"colors": {
"primary": "#8b5cf6",
"secondary": "#0ea5e9",
"background": "#ffffff",
"text": "#1f2937"
},
"typography": {
"headingFont": "Inter",
"bodyFont": "Inter",
"baseFontSize": "16px"
},
"spacing": {
"sectionPadding": "4rem"
}
}
}
Creating a Theme
Step 1: Create Directory
mkdir -p themes/my-theme
cd themes/my-theme
Step 2: Create Manifest
Create theme.json with your settings.
Step 3: Add Styles
/* styles/main.css */
:root {
--color-primary: var(--theme-primary, #8b5cf6);
--color-secondary: var(--theme-secondary, #0ea5e9);
}
.hero-section {
background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}
Step 4: Test Theme
- Go to Themes in admin
- Find your theme
- Click Preview
- Activate if satisfied