getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org

Home Page:https://www.getzola.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] page.taxonomies.tags not found in context, but it is there

kwladyka opened this issue · comments

Bug Report

Environment

Zola version:
zola 0.18.0

Expected Behavior

<p>{{ page.taxonomies | json_encode() }} is {"tags":["foo","bar"]}</p>
<p>{{ "tags" in page.taxonomies }} is true</p>
<p>but {{ page.taxonomies.tags }} is exception</p>

Error: Reason: Failed to render 'page.html'
Error: Reason: Variable page.taxonomies.tags not found in context while rendering 'page.html'

{{ page.taxonomies.tags }} should return ["foo","bar"].

Step to reproduce

Try to read taxonomies directly by key (tags in the example) in page.html for any post containing

[taxonomies]
tags = ["foo", "bar"]