Cecil logo

Library

You can use the Cecil as a PHP library.

Installation

composer require cecil/cecil

Usage

Cecil::create(
    [
        'title'   => "My website",
        'baseurl' => 'http://localhost:8000/',
    ]
)->build();

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

Change source directory

Cecil::create()
    ->setSourceDir(__DIR__.'/source')
    ->build();

Change destination directory

Cecil::create()
    ->setDestinationDir(__DIR__.'/destination')
    ->build();

Example

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

use Cecil\Builder;

// Run the builder
Cecil::create(
    [
        'title'   => "My website",
        'baseurl' => 'http://localhost:8000/',
    ]
)->build();

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

Suggest a modification

← Deploy