Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
/ component.php Public archive

Component.io generating static pages

License

Notifications You must be signed in to change notification settings

therealtbs/component.php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Component.php

Create static html files from Component.io components.
Currently WIP

How-to

  1. Create a new project and associated components on https://component.io
  2. Create a tpl folder in the working directory
  3. Add in your templates with the extension .html.php, each template will be processed and the output written to the dest folder with the .php extension removed
  4. Create a dest folder in the working directory
  5. Run php component.php or HTTP POST to it if running on a web server

Reference

ComponentCls($project, $component)

$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

Example

<?php
$thing = \Component\ComponentCls('cio-library', 'errba');
echo $thing->content;

ComponentCls->build_image($img, $tf)

Works the same as the official one, see https://guide.component.io/v1/api/index.html#Component-buildImage-image-options

About

Component.io generating static pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages