PHPackages                             bnomei/kirby3-handlebars - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. bnomei/kirby3-handlebars

AbandonedKirby-plugin[Templating &amp; Views](/categories/templating)

bnomei/kirby3-handlebars
========================

Kirby Component for semantic templates with Handlebars and Mustache

5.0.0(7mo ago)102.0k1MITPHPPHP &gt;=8.2CI passing

Since Jul 29Pushed 7mo agoCompare

[ Source](https://github.com/bnomei/kirby-handlebars)[ Packagist](https://packagist.org/packages/bnomei/kirby3-handlebars)[ Fund](https://buymeacoff.ee/bnomei)[ Fund](https://paypal.me/bnomei)[ RSS](/packages/bnomei-kirby3-handlebars/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (7)Versions (56)Used By (0)

Kirby Handlebars / Mustache
===========================

[](#kirby-handlebars--mustache)

[![Kirby 5](https://camo.githubusercontent.com/b1a1b2ccd58e96259a9722c2489d91f40378c01b6c4c3e9fd27ed1d12c269d7c/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f4b697262792f353f636f6c6f723d454343373438)](https://getkirby.com)[![PHP 8.2](https://camo.githubusercontent.com/fd050028b4459f3f6e4db5703412957375ceb180d27951213d421eb2a23c8c8e/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f5048502f382e323f636f6c6f723d3445354239332669636f6e3d706870266c6162656c)](https://camo.githubusercontent.com/fd050028b4459f3f6e4db5703412957375ceb180d27951213d421eb2a23c8c8e/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f5048502f382e323f636f6c6f723d3445354239332669636f6e3d706870266c6162656c)[![Release](https://camo.githubusercontent.com/ec1bb7facd9836af2bca215ee59210fe85c3e02cc1cbf036c9d16ad1b212671d/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b697262792d68616e646c65626172733f636f6c6f723d6165383166662669636f6e3d676974687562266c6162656c)](https://camo.githubusercontent.com/ec1bb7facd9836af2bca215ee59210fe85c3e02cc1cbf036c9d16ad1b212671d/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f762f626e6f6d65692f6b697262792d68616e646c65626172733f636f6c6f723d6165383166662669636f6e3d676974687562266c6162656c)[![Downloads](https://camo.githubusercontent.com/263d35e7e7ea80a8eeec9674150332ee75d9ea7072462d72fca868dadff31e12/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b697262792d68616e646c65626172733f636f6c6f723d3237323832322669636f6e3d676974687562266c6162656c)](https://camo.githubusercontent.com/263d35e7e7ea80a8eeec9674150332ee75d9ea7072462d72fca868dadff31e12/68747470733a2f2f666c61742e62616467656e2e6e65742f7061636b61676973742f64742f626e6f6d65692f6b697262792d68616e646c65626172733f636f6c6f723d3237323832322669636f6e3d676974687562266c6162656c)[![Discord](https://camo.githubusercontent.com/36eaef1b06f4996feb7587aa3281dcbd658e57535bc6b5e10110ed108e7a7a03/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f646973636f72642f626e6f6d65693f636f6c6f723d3732383964612669636f6e3d646973636f7264266c6162656c)](https://discordapp.com/users/bnomei)[![Buymecoffee](https://camo.githubusercontent.com/62e55d1129b82bf9c2fd4656451e81ab87a9787e7c9676ca58276532ed9666ee/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f69636f6e2f646f6e6174653f69636f6e3d6275796d6561636f6666656526636f6c6f723d464638313346266c6162656c)](https://www.buymeacoffee.com/bnomei)

Kirby Plugin for semantic templates with Handlebars and Mustache

Installation
------------

[](#installation)

- unzip [master.zip](https://github.com/bnomei/kirby-handlebars/archive/master.zip) as folder `site/plugins/kirby-handlebars` or
- `git submodule add https://github.com/bnomei/kirby-handlebars.git site/plugins/kirby-handlebars` or
- `composer require bnomei/kirby-handlebars`

Templates
---------

[](#templates)

You can can have handlebars and php templates in your `/site/templates` folder. The plugin will be used as template component for all files with `hbs` extension and default back to Kirbys core template component for the ones written in php.

Partials
--------

[](#partials)

Partials are stored at `/site/template/partials`. Think of them as reusable blocks injected into your handlebars templates **before** they get compiled.

**/site/templates/partials/piece-of-cake.hbs**

```
Piece of {{ cake }}
```

**/site/templates/call-a-partial.hbs**

```
{{> piece-of-cake }}
```

**/content/pizza/call-a-partial.txt**

```
Title: 🍕
```

**/site/controllers/call-a-partial.php**

```
