Hi! I’m trying to figure out how to use the Hugo built-in figure shortcode with a page resource (instead of pointing directly to the file). As I want to use it in a normal content markdown document of my website, as far as I understood, I cannot use something like
{{ $img := .Resources.Match "image" }}
{{< figure src="$img.RelPermalink" title="Lorem ipsum" >}}
directly in my markdown file.
I didn’t find a solution in the Hugo docs. And all the examples I found work by creating a new figure short code but I’m pretty sure there must be a possibility to make it work with Hugos default functions, which I failed to recognize so far. Any help appreciated!
Thx!