I want to add the hugo version within a markdown content file, so created a shortcode (“hugo-info.html”) containing simply:
{{ .Hugo.Version }}
This generates the following build error:
Building sites … ERROR 2018/05/03 12:16:07 error processing shortcode "shortcodes/hugo-info.html" for page "page/site-notice.md": template: shortcodes/hugo-info.html:1:8: executing "shortcodes/hugo-info.html" at <.Hugo.Version>: can't evaluate field Hugo in type *hugolib.ShortcodeWithPage
Total in 26 ms
Error: Error building site: logged 1 error(s)
However, if I replace the shortcode with a different variable, for instance,
{{ .Site.BaseURL }}
it works as expected.
Is it not possible to access Hugo variables within a shortcode?