Helpers (56)
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…
{{translate}} helper
Helper used for creating translatable phrases in the theme. Syntax: {{ translate 'key.subkey' [string1 string2 ...] }} Example: {{ translate 'partials.cookiebar.close' }} You can find…
{{font}} helper
It creates an URL to the Google Fonts service for a given font name. Syntax: {{font FONT_NAME}} Example: <link rel="stylesheet" href="{{font @config.visual.font}}" />
{{socialMetaTags}} helper
Helper for creating Open Graph and Twitter Cards meta tags. Place it in the <head> section. The helper outputs the tags you enable in Site…
{{#checkIfNone}} helper
Block helper which renders its content when none of the arguments has a value. It is the opposite of the #checkIfAny helper. Use it for…
{{menuItemClasses}} helper
Helper for creating CSS classes in the menu. Syntax: {{menuItemClasses CLASSNAME_1 CLASSNAME_2 ... CLASSNAME_N}} Examples: {{menuItemClasses}} Outputs standard menu item classes. {{menuItemClasses "active"}} Outputs standard…
{{#checkIfAll}} helper
Block helper for creating conditions where all elements are connected using AND operator. Use it to show a block only when all the values are…
{{responsiveSrcSet}} helper
Helper for the srcset attribute for the given image. The helper builds the list from the image sizes defined in the files.responsiveImages section of the…
{{feedLink}} helper
It creates a link element with URL to the RSS and JSON feeds (if they are enabled in the site settings). Syntax: {{feedLink}} Example output:…
{{css}} helper
It creates URL to the CSS file from the css catalog in the assets directory. Additionally, it adds to the file URL the v= param.
{{encodeUrlFragment}} helper
Helper used if you need to use a text inside the URL i.e. when you are using the social sharing scripts. To encode a whole…
{{jsonLD}} helper
Helper for creating output of the JSON-LD data Syntax: {{jsonLD}} Example output: <script type="application/ld+json"> // JSON-LD object output </script> Should be used in the <head>…