WordPress Handlebars Engine
Renders Handlebars templates within your WordPress Theme/Plugin
by Christian Tschugg · github.com/iantsch/wp-hbs-engine · website
★ 4stars
35composer installs
5forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/iantsch/wp-hbs-engine/archive/refs/heads/master.zipAlso on Packagist as iantsch/wp-hbs-engine:
composer require iantsch/wp-hbs-engineFrom the readme
WordPress Handlebars Engine
Renders Handlebars/Moustache templates within your WordPress Theme/Plugin. Handlebars rendering is powered by LightnCandy. Tested with WordPress 5.2.3
Installation
You can install this (must-use) plugin two ways
Via Composer
If you load your dependenies via Composer you can load this plugin with
Via Download
Download/fork this repository and copy the plugin-folder into wp-content/plugins/.
If you visit your Plugin section in the wp-admin area, activate it and you are good to go.
Troubleshoots
You need to load the zordius/lightncandy dependency via composer. Install composer and run $ composer install in the wp-content/plugins/wp-hbs-engine folder.
The plugin needs a folder with write permissions for caching the handlebar files. It tries to create the folder wp-content/plugins/wp-hbs-engine/cache.
The plugin will try to load partials from the default folder src/templates/partials within your current theme. If the folder does not exist please add it (or use the filter hook to adapt).
Usage
Setup and modify the render engine to your needs in your functions.php or your plugin
In your theme call it like a WordPress function.
In your article.h