Cecil logo
What's on this page

Library

You can use the Cecil as a PHP library.

Installation

composer require cecil/cecil

API

Cecil provides a simple PHP API to build your website.

You can read the API documentation for more details.

Usage

Build

Build a new website with a custom configuration:

use Cecil\Builder;

// Create a configuration array
$config = [
    'title'   => "My website",
    'baseurl' => 'https://domain.tld/',
];

// Build with the custom configuration
Builder::create($config)->build();

Example

require_once 'vendor/autoload.php';

use Cecil\Builder;

// Build with the website with the `config.php` configuration file
Cecil::create(require('config.php'))->build();

// Preview locally
exec('php -S localhost:8000 -t _site');

Suggest a modification