HTML Filters

HTML filters are used as shorthand to generate HTML content.

img_tag(url, alt="")

The img_tag filter creates an image tag using the url as the image source (<img src="..">)

{{ 'mylogo.png' | asset_url | img_tag }}

script_tag(url)

The script_tag filter creates a script tag using the url as the script source (<script src="..")

{{ 'mysite.js' | asset_url | script_tag }}

style_tag(url)

The style_tag filter creates a link tag using the url as the href (<link rel="stylesheet" type="text/css" href="..." />).

{{ 'mysite.css' | asset_url | style_tag }}