Hi there!
I’m using the Docsy-Theme that has some shortcodes, one of them is for outputting a nice visual block:
{{% blocks/feature url="https://someurl.com" %}}
Some Text
{{% /blocks/feature %}}
Now, as you can see, the shortcode has a url
parameter. In that parameter, I want to insert something that I’ve defined in config.yaml
: .Site.Params.project_links.myurl
.
I’ve tried the following to make it work:
{{% blocks/feature url="{{< param "project_links.myurl" >}}" %}}
^ results in error during compilation
{{% blocks/feature url="{{ $.Site.Params.project_links.myurl }}" %}}
^ verbatim output of the given url text, so it rendered to href="{{ $.Site... }}"
^ also the same with any other argument, like .Site.Params, .Params, etc.
Within the blocks/feature
shortcode, the code is like this:
{{ with .Get "url" }}<p><a href="{{ . }}">...</a>{{ end }}
Is it somehow possible to use the Docsy shortcode and feed it something I’ve defined in the config.yaml
?
Thanks!