What is the "hugo way" to replace process template parameters in markdown files?

I have a pretty basic site with the following markdown (/content/documentation/_index.md)

title = "Documentation"
draft = false

- Check the [Latest doxygen documentation](http://pongasoft.github.io/jamba/docs/{{ .Site.Params.jambaLatest }}/html/index.html)
- The [jamba-sample-gain](https://github.com/pongasoft/jamba-sample-gain) project was designed as a documentation plugin for this project.
- The [vst-vac-6v](https://github.com/pongasoft/vst-vac-6v) plugin is built with Jamba.
- The [vst-ab-switch](https://github.com/pongasoft/vst-ab-switch) plugin is built with Jamba.
- The [vst-sam-spl-64](https://github.com/pongasoft/vst-sam-spl-64) plugin is built with Jamba.
- The [Announcing Jamba](https://www.pongasoft.com/blog/yan/vst/2018/08/29/Announcing-Jamba/) blog post goes into more details about the history and the main features of the framework.

and it is not being rendered properly because the {{ .Site.Params.jambaLatest }} is not being processed.

So a few questions:

  • is there a way to configure hugo so that it will also template process markdown files like it does for html file?
  • if not then what is the proper/recommended way to do this with hugo?

Thanks for the help

You may want the built in param shortcode for this https://gohugo.io/content-management/shortcodes/#param

1 Like

This actually works! Thank you very much.

That being said, I don’t understand why {{< param xxx >}} works but {{ .Site.Params.xxx }} doesn’t. What is the difference exactly?

I think what is confusing (in my mind) is that both syntaxes are “replacement” so clearly .md are being processed in some fashion but not in other. Is this described in the documentation somewhere?

But thanks for the response. At least I can move forward.


I’m glad it works :+1:

When you see this syntax


That is a shortcode. It allows you to use templating features directly in your markdown content. You can read more about shortcodes in the docs.

1 Like