schornio / static-website-generator
Generates files from Handlebar-Templates on the server
Installs: 110
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 3
pkg:composer/schornio/static-website-generator
Requires
- erusev/parsedown: ^1.7
- guzzlehttp/guzzle: ^6.3
- phpmailer/phpmailer: ^6.4
- zordius/lightncandy: ^1.2
- dev-master
- v5.4.0
- v5.3.1
- v5.3.0
- v5.2.2
- v5.2.1
- v5.2.0
- v5.1.0
- v5.0.0
- v4.1.0
- v4.0.1
- v4.0.0
- v3.1.1
- v3.1.0
- v3.0.2
- v3.0.1
- v3.0.0
- v2.4.0
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.0
- v1.8.0
- v1.7.0
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
- dev-dependabot/composer/guzzlehttp/psr7-1.9.1
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/phpmailer/phpmailer-6.5.0
This package is auto-updated.
Last update: 2025-10-20 00:25:55 UTC
README
composer require schornio/static-website-generator
Scripts
- sio-swg-compile: compiles ./componentsto stdout php-script
- sio-swg-generator: each component has the opportunity to run a script at render time (generator.php,function <component_name>_generator ())
- sio-swg-render: overwrites ./distwith given Storyblok content
Handlebar helpers
- echo
- join
- replace
- toJSON
- toAlphaNum
- equal
- switch
- case
- split
- useDynamic
- markdown
- getStory
- getStories
- getCurrentStory
- url
- resize
- resolveSlug
- textToSlug
- isActiveStory
- renderTimestamp
- formatDate
- storyblokToken
- (storyblokBridge)
Image Processor must be located at public/images
RewriteCond %{REQUEST_URI} ^/public/images/.+
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ public/imageProcessor.php [L]
Difference between static (.html) and dynamic (.php) content
The hbs-helper {{useDynamic}} markes a template as dynamic content. If at least one template in the render-chain is marked as dynamic then the resulting file will end in .php instead of .html.
{{useDynamic}}
<?php
// Dynamic content here
$data = json_decode("{{{toJSON data}}}");
?>
Special slug --fileextension-
If a slug contains (filename)--fileextension-(extension) the file will be stored as (filename).(extension). Eg sitemap--fileextension-xml will be converted to sitemap.xml