I’m currently working on migrating one of our open source websites that’s using Jekyll to Hugo. We use a site variable to define what is the currently stable version (e.g. 1.16.0). That value needs to be displayed in the title of the page, which is defined as a page variable.
So in our config.toml we have:
[params]
# Version numbers used in the text for stable and snapshot versions,
# e.g. "Documentation for {{ site.stable }".
stable = "1.16"
And in one of the pages that we have, I’m trying to use that defined variable. I’ve tried both defining it first in as shortcode
{{ $.Site.Params.stable }}
And then refer to that shortcode in the page variable, like:
---
title: Flink {{< flink-stable-version >}} (Latest stable release)
icon: <i class="fa fa-cogs title maindish" aria-hidden="true"></i>
bold: true
---
Unfortunately this doesn’t generate the result. It appears that this is not possible with Hugo (also looking at the other support tickets, like Use Front Matter Variable in Page?).
What would be the best way to resolve this need?