fubber / mini-cms-starter
Default starter site for MiniCMS
Package info
github.com/frodeborli/mini-cms-starter
Type:project
pkg:composer/fubber/mini-cms-starter
v0.1.1
2026-06-09 23:06 UTC
Requires
- fubber/mini-cms: ^0.2.0
README
A starter project for Mini CMS — a template-first CMS built as an aspect on the Mini PHP framework.
Quick start
composer create-project fubber/mini-cms-starter my-site
cd my-site
php -S localhost:8899 -t html html/index.php
Open http://localhost:8899 in your browser. Log in at /login to access the admin panel and inline editing.
What's included
This starter ships a documentation site that doubles as a working example. It demonstrates:
- Page routing via
_content/routes.php - Template inheritance with
$this->extend()and$this->block() - Inline-editable content with
cms_text(),cms_html(), andcms_image() - Reusable partials with
cms_partial() - Context-aware content storage on the filesystem
Project structure
_content/ Routes, models, site config, and content files (JSON/HTML)
_views/ PHP templates — override any CMS default file-by-file
_static/ Public static assets (CSS, images)
_routes/ Custom route handlers (filesystem-based routing)
html/ Web server document root
bootstrap.php App bootstrap (loaded via Composer autoload)
Making a new page
-
Add a route in
_content/routes.php:'/about' => new Page('pages/about', title: 'About'),
-
Create the view at
_views/pages/about.php:<?php $this->extend(); ?> <?php $this->block('title', 'About'); ?> <?php $this->block('content'); ?> <?= cms_text('heading', 'Heading', 1, 'About Us', 'h1') ?> <?= cms_html('body', 'Body', 2, '<p>Tell your story here.</p>') ?> <?php $this->end(); ?>
Content is stored as files in _content/ — version it with git, edit it from the admin panel, or modify it directly on disk.
Links
- Mini CMS — the CMS aspect
- Mini framework — the underlying PHP framework