From ffee1f2be4293a93e63d3b930bc0393aa9516920 Mon Sep 17 00:00:00 2001 From: Aaron Arney Date: Tue, 10 May 2016 14:10:30 -0400 Subject: [PATCH] Add ifequal helper documentation to readme.md The helper function is present in the source code, but not documented. This commit adds the function and a single use case to the helpers section of the readme. --- docs/pages/panini.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/pages/panini.md b/docs/pages/panini.md index 3b76e22ff..001076a0a 100644 --- a/docs/pages/panini.md +++ b/docs/pages/panini.md @@ -120,6 +120,14 @@ The `../` is added only on pages in a sub-folder, so the CSS can still be proper Helpers are special functions that manipulate content on the page. In addition to [Handlebars's built-in helpers](http://handlebarsjs.com/builtin_helpers.html), Panini includes a few custom helpers and you can add your own. +### ifequal +Displays the HTML inside the helper if the two values are equal. +```handlebars +{{#ifequal foo bar}} +

foo and bar are equal

+{{/ifequal}} +``` + ### ifpage Displays the HTML inside the helper only on specific pages. In the below example, the HTML inside the helper will only show up on the `index.html` page. -- 2.47.2