This is an application based on PHP, which can help you easily create wordpress template based on your twig template.
For a good start, you can check the example of template which you can find in the folder html/demo
PHP 7.1+
Clone repository git clone git@github.com:sharovik/themer.git
or download latest version of themer.phar
bin file.
Run the command: ./themer.phar --path={ABSOLUTE_PATH_TO_YOUR_PROJECT}
. Example: ./themer.phar --path=/var/project/html/demo/
Twig is a modern template engine. More information you can find here.
As you might know, different CMS can have different kind of logic related to template hierarchy, but mostly all of them have base skeleton:
- header
- content
- footer
During templates build we also use these kind of blocks:
- header - for header block, which will be same for each page
- content - for content block, which can be different for each page
- footer - for footer block, which will be same for each page
Also we have custom blocks, which help use to identify, where is the assets links or navigation parts of template.
- css - for css block defining
- js - for js block defining
- navigation - for navigation block defining
In demo template you can find themer.config.json
file, where you can see base configuration for template. This configuration we use during the template build.
For example, there you can specify template name, author name and etc.
Currently library supports these kind of fields:
{
"themeName": "STANLEY",
"author": "David Creighton-Pester",
"authorUrl": "https://dribbble.com/wanderingbert",
"authorEmail": "john@doe.com",
"themeVersion": "0.1",
"themeAlias": "demo",
"engine": "twig"
}
- Pavel Simzicov - Initial work - sharovik
- TemplateMag.com - Stanley demo template - TemplateMag.com
- Twig - The template language - Twig Team