PHPackages                             thecodingmachine/cms-static-registry - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. thecodingmachine/cms-static-registry

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

thecodingmachine/cms-static-registry
====================================

A static registry (loads pages from static files) for thecodingmachine/cms-interfaces.

03831PHP

Since Jan 4Pushed 8y ago6 watchersCompare

[ Source](https://github.com/thecodingmachine/cms-static-registry)[ Packagist](https://packagist.org/packages/thecodingmachine/cms-static-registry)[ RSS](/packages/thecodingmachine-cms-static-registry/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/d4a279d4ee03a122551941fbf18b5e6491de29850e5c362d2e1e36abb89e1217/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792f762f737461626c65)](https://packagist.org/packages/thecodingmachine/cms-static-registry)[![Total Downloads](https://camo.githubusercontent.com/1ca7f0b0193f353a07c973a6d6a875193b6fcf45c42951dbaed311a92735d997/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792f646f776e6c6f616473)](https://packagist.org/packages/thecodingmachine/cms-static-registry)[![Latest Unstable Version](https://camo.githubusercontent.com/bf6a4044d6be9c5a51d5382009f5adddead37c1480e229036a0e0c5046bd45be/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792f762f756e737461626c65)](https://packagist.org/packages/thecodingmachine/cms-static-registry)[![License](https://camo.githubusercontent.com/a9b1a5a2e1d8aa69c810570d946805e048c958e7dfecef865fb8c859df633a54/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792f6c6963656e7365)](https://packagist.org/packages/thecodingmachine/cms-static-registry)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6e9e74f93e0a14f5281f92de1f1f197e2cfeb675a33d85b6807c2addf567afd4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thecodingmachine/cms-static-registry/?branch=master)[![Build Status](https://camo.githubusercontent.com/670e7792ac7f642eeb9e32c748b68fd75ebb112b29e69b95f2c55ec6a5ab58a6/68747470733a2f2f7472617669732d63692e6f72672f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/thecodingmachine/cms-static-registry)[![Coverage Status](https://camo.githubusercontent.com/699b60acb586d37e97f4cf137f78c4691787e4c5d7c47f43d9aaf0998785e1d1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f746865636f64696e676d616368696e652f636d732d7374617469632d72656769737472792f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/thecodingmachine/cms-static-registry?branch=master)

CMS static registry
===================

[](#cms-static-registry)

Load pages/blocks/themes from static files in your repository.

This package can ban used with the [CMS interfaces](https://github.com/thecodingmachine/cms-interfaces) to build a full-featured PSR-7 CMS.

Why?
----

[](#why)

Most CMSes out there store content of HTML pages in databases. While there are a number of advantages to do so, this also comes with some drawbacks:

This package is a "file store". It proposes to store files, blocks, themes, etc... into static files instead.

Files have a number of advantages over databases:

- They can be committed in your code repository
- Therefore, it is easy to migrate content from a test environment to a production environment (content is part of your code)
- It is also easy to keep track of history (using your favorite VCS like GIT)
- You can easily work as a team on some content and use branching and merging capability of your VCS to manage content

Of course, this is no silver bullet and using a database to store content can make a great deal of sense. But for content that is mostly administered by a technical team, storing content in files instead of a database is a breeze of fresh air.

Directory structure
-------------------

[](#directory-structure)

Your website will typically be stored in directory of your project.

The default proposed directory structure is:

- cms\_root
    - pages
        - a\_page.html
        - another\_page.md
    - blocks
        - a\_block.html
        - another\_block.md
    - themes
        - my\_theme
            - index.twig
            - config.yml
            - css/
            - js/
            - ...
    - sub\_themes
        - a\_subtheme.yml
        - another\_subtheme.yml

### Pages

[](#pages)

A page is... well... it's a page of your website! Pages can be:

- in HTML (if the extension is `.html`)
- in Markdown (if the extension is `.md`)

Pages come with a *YAML frontmatter*.

Here is a sample page:

```
---
url: hello/world
website : example.com
lang : fr
title : foo
theme : foo_theme
meta_title : bar
meta_description : baz
menu : menu 1 / menu 2 / menu 3
menu_order : 1
---

Hello world!
```

The YAML frontmatter MUST be surrounded by `---`.

Parameters of the YAML Frontmatter:

NameCompulsoryDescriptionurl*Yes*The URL of the page. It contains only the *path*. For instance: `/foo/bar`website*No*The domain name of the page. For instance: *example.com*lang*Yes*The language of the page, on 2 characters. For instance: "en", "fr"...title*Yes*The title of the page (goes into the &lt;title&gt; HTML tagtheme*No*The theme (or sub-theme) of the page (more about themes below)id*No*A unique ID for the pagemenu*No*The menu item. The path to the menu item is separated by '/'. For instance: 'Products / Food / Bananas'menu\_order*No*The priority of the menu itemmenu\_css\_class*No*An optional CSS class to be applied to the menu itemmeta\_title*No*The title &lt;meta&gt; tagmeta\_description*No*The description &lt;meta&gt; tagtheme*No*The theme to be used for this pagetemplate*No*The path to the Twig template applied for this page. Relative to the theme root directory. For instance: "blog.twig"context*No*An array of values passed to fill the Twig template.inherits*No*A reference to a YAML file that contains default values for the page. For instance: "../page\_defaults.yml"TODO: continue documentation

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

![](https://avatars.githubusercontent.com/u/1847918?v=4)[TheCodingMachine](/maintainers/thecodingmachine)[@thecodingmachine](https://github.com/thecodingmachine)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (34 commits)")

### Embed Badge

![Health badge](/badges/thecodingmachine-cms-static-registry/health.svg)

```
[![Health](https://phpackages.com/badges/thecodingmachine-cms-static-registry/health.svg)](https://phpackages.com/packages/thecodingmachine-cms-static-registry)
```

###  Alternatives

[dereuromark/cakephp-calendar

A CakePHP plugin to easily create calendars.

1646.8k1](/packages/dereuromark-cakephp-calendar)[aerni/factory

Quickly whip up fake content

193.5k](/packages/aerni-factory)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
