Skip to content

Instantly share code, notes, and snippets.

View Awilum's full-sized avatar
🧙‍♂️
WORK HARD. PLAY HARD

Sergey Romanenko Awilum

🧙‍♂️
WORK HARD. PLAY HARD
View GitHub Profile
@Awilum
Awilum / flextype-static-site-generator.php
Last active March 13, 2022 17:51
Flextype Static Site Generator
<?php
// Add this route to your Flextype Website to generate static website.
flextype()->get('/generate-static-site', function () {
// Set static site directory path
$staticSitePath = '../awilum.github.io/';
// Set static site base url
//flextype('registry')->set('flextype.settings.url', 'CUSTOM_BASE_URL');
# Run phpstan
php -d memory_limit=1G ./vendor/bin/phpstan
# Run pest
php -d memory_limit=1G ./vendor/bin/pest
# Run phpcbf
./vendor/bin/phpcbf --standard=Doctrine ./src/flextype/core/Actions.php
# Start Symfony Local Server