Introduction - helpers
Helpers are custom functions defined for Handlebars in Publii. We have defined many helpers - both inline and conditional. All conditional helpers have the hash char in their name.
If you are new to Handlebars, start with the Handlebars introduction.
For example, {{#checkIf}} is a conditional helper, where {{date}} is an inline helper.
Of course, it is also possible to create custom helpers in the theme.
Helpers by purpose
- Conditions: checkIf, checkIfAll, checkIfAny, checkIfNone, is, isNot, isEmpty, isNotEmpty, contains, notContains, isCurrentPage
- Content: getPost, getPosts, getPostsByTags, getPostByTags, getPostsByCustomFields, getPage, getPages, getPagesByCustomFields, getTag, getTags, getAuthor, getAuthors
- Images: responsiveImageAttributes, responsiveSrcSet, responsiveSizes, imageDimensions, lazyload
- Head and SEO: publiiHead, publiiFooter, metaDescription, metaRobots, canonicalLink, socialMetaTags, jsonLD, feedLink
- Assets and URLs: asset, css, js, font, pageUrl, menuUrl, menuItemClasses, encodeUrl, encodeUrlFragment
- Text and data: date, translate, math, join, concatenate, jsonify, orderby, reverse
- Privacy: gdprScriptBlocker