1. Go to this page and download the library: Download terdelyi/phanstatic 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/ */
terdelyi / phanstatic example snippets
use Terdelyi\Phanstatic\Models\Config;
use Terdelyi\Phanstatic\Models\CollectionConfig;
return new Config(
baseUrl: (string) getenv('BASE_URL'),
title: 'My super-fast static site',
collections: [
'posts' => new CollectionConfig(
title: 'Posts',
slug: 'posts',
pageSize: 10
),
],
);