PHP code example of statamic / static-site-generator
1. Go to this page and download the library: Download statamic/static-site-generator 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/ */
statamic / static-site-generator example snippets
use Statamic\StaticSite\SSG;
class AppServiceProvider extends Provider
{
public function boot()
{
SSG::addUrls(function () {
return ['/one', '/two'];
});
}
}
php
use Statamic\StaticSite\SSG;
class AppServiceProvider extends Provider
{
public function boot()
{
SSG::after(function () {
// eg. copy directory to some server
});
}
}