PHPackages                             shaack/reboot-cms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. shaack/reboot-cms

ActiveProject[Parsing &amp; Serialization](/categories/parsing)

shaack/reboot-cms
=================

A lightweight, flat-file Content Management System with block-based content rendering

4706PHP

Since Mar 14Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/shaack/reboot-cms)[ Packagist](https://packagist.org/packages/shaack/reboot-cms)[ RSS](/packages/shaack-reboot-cms/feed)WikiDiscussions distrib Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Reboot CMS
==========

[](#reboot-cms)

A flat file, Markdown CMS in PHP, inspired by [Pico](http://picocms.org), [Redaxo](https://redaxo.org/)and [Craft CMS](https://craftcms.com/).

Reboot CMS is a minimal CMS without a database, but with the support of **blocks** to structure the content.

[![Edit a page](web/media/screenshots/reboot-cms-admin-page-edit.png)](web/media/screenshots/reboot-cms-admin-page-edit.png)

Why another CMS?
----------------

[](#why-another-cms)

I developed Reboot CMS because I couldn't find a CMS that works with flat markdown files but allows easy use of blocks.

Reboot CMS is very small and the pages are delivered extremely fast. My website [shaack.com](https://shaack.com), built with Reboot CMS, has a [PageSpeed Insights performance score of 100](https://pagespeed.web.dev/report?url=https%3A%2F%2Fshaack.com%2F).

Websites using Reboot CMS
-------------------------

[](#websites-using-reboot-cms)

- [The Reboot CMS demo page](https://shaack.com/projekte/reboot-cms/)
- [shaack.com](https://shaack.com)
- [wukies.de](https://wukies.de)
- [chesscoin032.com](https://chesscoin032.com)

Minimum System Requirements
---------------------------

[](#minimum-system-requirements)

- **PHP** 8.0 or higher
- **Web Server:** Apache with mod\_rewrite (or compatible server)
- **No database required** — all content is stored as flat files

Install
-------

[](#install)

Clone or download the [Reboot CMS repository](https://github.com/shaack/reboot-cms):

```
git clone https://github.com/shaack/reboot-cms.git my-site
```

### Quick Start

[](#quick-start)

Run the CMS with PHP's built-in web server (no Apache or Docker needed):

```
./run.sh
```

The site is available at `http://localhost:8080`, the admin at `http://localhost:8080/admin`. You can specify a custom port: `./run.sh 3000`.

### Docker / Podman

[](#docker--podman)

```
cd compose && podman compose up -d
```

The site is available at `http://localhost:8080`.

### Production Setup

[](#production-setup)

Point your web server's document root to the `web/` directory. The CMS should work out of the box.

On first visit to `/admin`, you will be prompted to create an admin account.

Directory Structure
-------------------

[](#directory-structure)

- `core/src/` — Core CMS classes (Reboot, Site, Page, Block, Request, AddOn)
- `site/` — Site content: `pages/`, `blocks/`, `addons/`, `template.php`, `config.yml`
- `web/` — Document root (`index.php`, `.htaccess`)
- `local/` — Local environment config (`config.yml`, `.htpasswd`) — not in git
- `core/admin/` — Admin interface (itself a Reboot CMS site)

Configuration
-------------

[](#configuration)

- `site/config.yml` — Site-wide settings: addon registration, navbar with `brand` and `structure`
- `local/config.yml` — Local/environment settings (not committed to git):

```
# Logging: 0 = debug, 1 = info, 2 = error
logLevel: 2

# Admin editor settings
editor:
  font: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace'
  fontSize: '0.95rem'
  lineHeight: '1.4'
  tabSize: 4
  wordWrap: true
  tools:
    - Headings
    - "|"
    - Bold
    - Italic
    - Strikethrough
    - "|"
    - UnorderedList
    - OrderedList
    - "|"
    - InsertLink
    - InsertImage

# Page history: number of snapshots to keep per page
history:
  maxVersions: 50
```

Available editor tools: `Headings`, `Bold`, `Italic`, `Strikethrough`, `UnorderedList`, `OrderedList`, `InsertLink`, `InsertImage`. Use `"|"` for a separator. The admin tools (`InsertPageLink`, `InsertMedia`, `InsertBlock`) are always appended automatically.

Template
--------

[](#template)

The file `site/template.php` is the main HTML template. It receives three variables:

- `$site` — the `Site` object
- `$page` — the `Page` object
- `$request` — the `Request` object

Call `$page->render($request)` to render the page content and `$page->getConfig()` to access the YAML front matter.

Documentation
-------------

[](#documentation)

### Page

[](#page)

Folder: `/site/pages`

A `Page` can be a **flat Markdown** file, can contain **Blocks** or also can be a **PHP** file. PHP pages receive the same variables as the template: `$site`, `$page`, and `$request`.

Pages are auto-routed on web-requests:

- `index.md` or `index.php` will be shown on requesting `/`
- `NAME.md` or `NAME.php` will be shown on requesting `/NAME`
- `FOLDER/index.md` (or .php) will be shown on requesting `/FOLDER`
- `FOLDER/NAME.md` (or .php) will be shown on requesting `/FOLDER/NAME`
- `404.md` (or .php) will be used as a custom 404 error page

Example for a Markdown `Page` with `Blocks`:

```
---
title: Reboot CMS
description: Reboot CMS is a flat file CMS, with the support of blocks.
author: shaack.com
---

# Reboot CMS

A flat file, markdown CMS with blocks

---

The main idea is to have a **minimal CMS** without needing a database, but with the support of blocks.

---

[Learn more](documentation)

## The "text-image" block

The block above is a "hero" block. This one is a "text-image" block. You can define multiple blocks as you need.
[Reboot CMS documentation](documentation)

Shipped with this CMS are some default block types, but it is easy to create your own, if you know some PHP.

---

![alt text](media/dummy.svg "Title Text")

### the

Duis aute **irure** dolor in *reprehenderit* in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est.

---

### "three-colums" Block

Ut enim ad minim [veniam](/), quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

---

### block

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
```

This `Page` contains 3 `Block` types, "hero", "text-image" and "three-columns". It will render to this:

[![A rendered page](web/media/screenshots/reboot-cms-index.png)](web/media/screenshots/reboot-cms-index.png)

Blocks can be configured in the block comment. With this configuration, the `text-image`block allows to display the image to the left side in desktop view.

Markdown files without blocks will render to a flat Markdown page like in every other flat file CMS.

You can define metadata for the page on top of the file in `YAML Front Matter` syntax.

### Block

[](#block)

Folder: `/site/blocks`

A `Block` describes how a block is rendered. Blocks are written in PHP.

The code for the "text-image" `Block` which was used in the page above, looks like this:

```
