Search by

getherbie / herbie

getherbie

Herbie is a simple, modern, fast and highly customizable flat-file Content Management System (CMS) powered by PHP, Twig, Markdown, Textile, reStructuredText and other human-readable text files.

Package info

github.com/getherbie/herbie

Homepage

pkg:composer/getherbie/herbie

Statistics

Installs: 2 682

Dependents: 21

Suggesters: 0

Stars: 92

Open Issues: 6

v3.2.1 2026-11-25 21:27 UTC

README

Packagist GitHub (pre-)release License PHP from Packagist

Herbie

Create small but fully functional websites or blogs in no time and with little effort 👌

Herbie is a blazing fast, lightweight, and highly customizable flat-file Content Management System (CMS) running on PHP, Twig, Markdown, Textile, reStructuredText, and other human-readable text files.

What Herbie Is Built On

Herbie relies on battle-tested libraries:

Its plugin system makes Herbie highly extensible, with built-in support for:

  • Application and route middlewares
  • Event listeners
  • Custom Twig filters, functions, tests, and globals
  • Console commands

Herbie follows the PHP-FIG standards:

Quality is ensured through:

Supported PHP Versions

8.3 / 8.4 / 8.5 / 8.6

Quick Start

Create your own Herbie website with Docker (recommended):

docker run --rm -v "$PWD":/app composer create-project --ignore-platform-reqs getherbie/start-website mywebsite
cd mywebsite
docker compose up website

Open http://localhost:8888.

Want to see it first? The Herbie Website Starter demo ships with 7 themes.

Without Docker (PHP & Composer required)
composer create-project getherbie/start-website mywebsite
cd mywebsite/web
php -S localhost:8888 index.php

Development

Work on this repository with Docker (recommended):

git clone https://github.com/getherbie/herbie.git
cd herbie
docker compose up website

Open http://localhost:8888.

Common tasks:

docker compose run --rm install    # install Composer dependencies
docker compose run --rm qa         # run all checks and tests
docker compose run --rm bash       # open a shell
docker compose up test-website     # test fixture site on http://localhost:8889

Use a different PHP version (default: 8.3):

PHP_VERSION=8.3 docker compose up website
PHP_VERSION=8.4 docker compose up website
PHP_VERSION=8.5 docker compose up website
PHP_VERSION=8.6 docker compose up website

Checks and tests (inside the container via docker compose run --rm bash, or with local PHP/Composer):

composer qa                  # all checks and all test suites

Static checks only:

composer qa:check            # lint, cs, cs-twig, phpstan, deptrac
composer qa:check:phpstan    # or a single check
composer qa:check:deptrac
composer qa:check:lint
composer qa:check:cs
composer qa:check:cs-twig

Tests only:

composer qa:test             # all suites
composer qa:test:unit        # or a single suite
composer qa:test:integration
composer qa:test:acceptance
composer qa:test:website
composer qa:test:coverage

The integration suite renders every twig code fence from the documentation and checks that its string literals use single quotes (tests/integration/Docs/TwigExamplesTest.php). It also checks the syntax of php, yaml, json and bash fences (tests/integration/Docs/DocSyntaxTest.php). Mark examples that cannot run or be parsed in the test site with no-test, e.g. ~~~twig no-test or ~~~php no-test.

The integration suite also checks the Twig reference data in website/site/data/twig_{functions,filters,tests}.yml against the functions, filters and tests registered in the test site (tests/integration/Docs/TwigReferenceTest.php).

Auto-fix code style:

composer qa:fix              # PHP and Twig
composer qa:fix:cs           # PHP only
composer qa:fix:cs-twig      # Twig only

Coverage requires Xdebug or PCOV. The Docker image includes Xdebug, so composer qa:test:coverage works inside the container; for a local PHP installation you need to install a coverage driver first.

Without Docker (PHP & Composer required)
git clone https://github.com/getherbie/herbie.git
cd herbie
composer install
cd website/web
php -S localhost:8888 index.php

Optional: HERBIE_DEBUG=1 php -S localhost:8888 index.php for debug output, or XDEBUG_MODE=debug php -S localhost:8888 index.php for Xdebug.

More Information

For more information, see https://herbie.tebe.ch.