Create static html files from Component.io components.
Currently WIP
- Create a new project and associated components on https://component.io
- Create a
tpl
folder in the working directory - Add in your templates with the extension
.html.php
, each template will be processed and the output written to thedest
folder with the.php
extension removed - Create a
dest
folder in the working directory - Run
php component.php
or HTTPPOST
to it if running on a web server
$project
the project id, $component
is the component id.
NOTE: At the moment you can only use components from one project.
The resulting object will have the properties of the component
<?php
$thing = \Component\ComponentCls('cio-library', 'errba');
echo $thing->content;
Works the same as the official one, see https://guide.component.io/v1/api/index.html#Component-buildImage-image-options