Cecil logo
What's on this page

Library

You can use the Cecil as a PHP library.

Installation

composer require cecil/cecil

Usage

Build

Build with the default configuration.

use Cecil\Builder;

Builder::create()->build();

Build with custom configuration:

$config = [
    'title'   => "My website",
    'baseurl' => 'http://localhost:8000/',
];

Builder::create($config)->build();

The main parameter of the create method should be an array or a Cecil\Config instance.

Example

<?php

date_default_timezone_set('Europe/Paris');
require_once 'vendor/autoload.php';

use Cecil\Builder;

// Run the builder
Cecil::create(require('config.php'))->build();

// Run a local server
exec('php -S localhost:8000 -t _site');

Suggest a modification