Logo de Cecil Cecil
Sur cette page

Bibliothèque

Vous pouvez utiliser Cecil comme bibliothèque PHP.

Installation

composer require cecil/cecil

API

Cecil propose une API PHP simple pour générer votre site web.

Vous pouvez consulter la documentation de l'API pour plus de détails.

Utilisation

Construction

Construisez un nouveau site web avec une configuration personnalisée :

use Cecil\Builder;

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

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

Exemple

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');