FearlessCMS Theme Development Documentation

FearlessCMS Theme Development Documentation

Welcome to the FearlessCMS theme development documentation! This collection of guides will help you create beautiful, functional themes for FearlessCMS.

📚 Documentation Index

Getting Started

Reference Guides

System Administration

Examples and Tutorials

🚀 Quick Start

  1. Read the Basics: Start with Creating Themes in FearlessCMS
  2. Follow the Workflow: Use Theme Development Workflow for step-by-step guidance
  3. Reference Syntax: Check Template Reference for all available variables and syntax
  4. Add Options: Learn about Theme Options to make your theme customizable
  5. Go Modular: Explore Modular Templates for better code organization

🎯 What You'll Learn

📁 Theme Structure

A typical FearlessCMS theme includes:

themes/your-theme/
├── templates/
│   ├── home.html      # Homepage template
│   ├── page.html      # Individual page template
│   ├── blog.html      # Blog listing template
│   ├── 404.html       # Error page template
│   ├── header.html    # Header module (modular system)
│   ├── footer.html    # Footer module (modular system)
│   └── navigation.html # Navigation module (modular system)
├── assets/
│   ├── style.css      # Main stylesheet
│   ├── images/        # Theme images
│   └── js/           # JavaScript files
├── theme.json        # Theme metadata
├── config.json       # Theme options (optional)
└── README.md         # Theme documentation

🔧 Key Features

Global UI Enhancements (Optional)

FearlessCMS can optionally inject two small UI features across themes:

Enabling/Disabling

Site-level flags in config/config.json (defaults shown):

{
  "global_ui_enhancements": true,
  "enable_hamburger": true,
  "enable_theme_toggle": true
}

Theme-level flags in themes/<theme>/config.json:

{
  "disableGlobalEnhancements": false,
  "disableHamburger": false,
  "disableThemeToggle": false,
  "supportsDarkMode": true
}

To quickly disable on a page/theme without changing JSON, add in your head module:

<meta name="fcms-disable-global-ui" content="1">

Requirements

Accessibility

💡 Tips for Success

  1. Start Simple: Begin with a basic, functional theme
  2. Use Modular Templates: Break down complex templates into reusable modules
  3. Test Thoroughly: Check on different devices and browsers
  4. Use Semantic HTML: Follow web standards for better accessibility
  5. Mobile-First: Design for mobile devices first, then enhance for desktop
  6. Document Everything: Include clear documentation for users

🤝 Contributing

Found an issue or have a suggestion? Contributions are welcome! Please:

  1. Check existing issues first
  2. Follow the established documentation style
  3. Test your changes thoroughly
  4. Submit clear, descriptive pull requests

📖 Additional Resources

🆘 Getting Help

If you need help with theme development:

  1. Check the documentation - Most questions are answered here
  2. Look at examples - Browse existing themes for inspiration
  3. Search issues - Check if your question has been asked before
  4. Ask the community - Join discussions in the project forums

🔒 Security Note: Config Directory Location

FearlessCMS supports storing your configuration files outside the webroot for enhanced security. Set the FCMS_CONFIG_DIR environment variable to point to a secure directory. See File Permissions Guide for details.


Happy theme development! 🎨

This documentation is maintained by the FearlessCMS community. Last updated: January 2025