Shortcodes not working for zola 0.15.3

I tried the simplest short code I could think of inside templates/shortcodes/testfunc.html

<h1>{{id}}</h1>

and in the html

<body>
{{ testfunc(id="1234") }}
</body>

but seem to get an error

PS D:\xra> zola serve 
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 1 pages (0 orphan) and 0 sections
Error: Failed to render section 'D:/xra/content/_index.md'
Reason: Failed to render 'index.html'
Reason: Function 'testfunc' not found

The builtin function youtube also appears not to work. zola check passes, but build fails with same error.

Conversely
{% set logo = resize_image(path="Logo-Transparency.png", width=100 , op="fit_width") %}
works fine

Any ideas

Shortcodes are meant to be used in Markdown, not in HTML.

1 Like