PHP code example of rias / craft-ssg

1. Go to this page and download the library: Download rias/craft-ssg library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rias / craft-ssg example snippets


use craft\base\Event;
use rias\ssg\SSG;
use rias\ssg\events\BeforeGeneratingEvent;

Event::on(
    SSG::class,
    SSG::EVENT_BEFORE_GENERATING,
    function (BeforeGeneratingEvent $event) {
        // Your code here
    }
);
shell
php craft ssg/static/generate