Debug Filters

Development helpers for debugging templates

1 min read 87 words

Development helpers for debugging templates.

debug

Pretty-print variable for debugging.

{{ page | debug }}
{{ config | debug(pretty=false) }}

typeof

Get the type of a variable.

{{ page | typeof }}      {# "Page" #}
{{ "hello" | typeof }}   {# "str" #}
{{ 42 | typeof }}        {# "int" #}

inspect

Inspect object attributes and methods.

{{ page | inspect }}
{# Properties: title, href, date, ... #}
{# Methods: get_toc(), get_siblings(), ... #}