Download the PHP package bitexpert/additeasy without Composer
On this page you can find all versions of the php package bitexpert/additeasy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bitexpert/additeasy
More information about bitexpert/additeasy
Files in bitexpert/additeasy
Package additeasy
Short Description PSR-7 compatible flat-file CMS
License Apache-2.0
Informations about the package additeasy
bitexpert/additeasy
addItEasy is a PSR-7 compatible flat-file CMS and static site generator written in PHP.
Installation
The preferred way of installing bitexpert/additeasy is through Composer. Simply add bitexpert/additeasy as a dependency:
To initialize a new project simply call the init command of the provided addItEasy cli tool:
Add a template
addItEasy uses Twig as templating engine. Create a template named "default.twig" in the templates folder like this:
Adding content
Content files need to placed in the content directory. Content files are basically Twig files which provide the blocks required by the template.
Every page of your site is represented by a subfolder in the content directory. The folder names build the URL structure for your site, nested subfolders are allowed. Each folder needs to be prefixed with a number which is used to indicate the sorting order. Each folder needs to contain one twig template file containing the content to display.
The content folder could look like this:
Twig helper functions
The current page object gets exposed as a variable named "page" in the template, the $EASY_CONF["site"] configuration array gets exposed as variable named "site". In addition to that addItEasy exposes 3 helper functions to "interact" with the content pages.
The children($pagename) function takes a page name as an argument and returns the child pages.
The siblings($pagename) function takes a page name as an argument and returns all sibling pages including the current page.
The pageblock($page, $blockname) function takes a page object as first argument and the name of the block to render as a second argument.
Running addItEasy
Running addItEasy as a flat-file CMS
In case you want to run addItEasy locally the following command needs to be executed in the project directory:
Open a web browser and point it to http://localhost:8080 so see addItEasy in action.
Running addItEasy as a static site generator
To export static HTML pages run the export command od the provided addItEasy cli tool:
The HTML files as well as the assets will get exported to the folder specified in the project configuration.
License
addItEasy is released under the Apache 2.0 license.
All versions of additeasy with dependencies
bitexpert/adrenaline Version ^0.4.0
bitexpert/disco Version ^0.9.0
bitexpert/slf4psrlog Version ^0.1.3
monolog/monolog Version ^1.14.0
symfony/console Version ^2.8.6