Is there a way to attach/embed specific posts in Hugo?
I have a reviews section and a products section. In my reviews I would like to attach/embed the products and display their content and metadata. I’ve solved this in Wordpress in Advanced Custom Fields, is there a way to do it with Hugo?
Could I write a shortcode and make use of the relref-funcionality?
When something doesn’t work, it’s always nice to show precisely what kind of data you fed it, what what it output, or what error it produced. This makes it way easier to get some help
I can already tell you that as far as I know nested brackets is not possible in go templates. The brackets delimit what’s compiled from what’s left intact in the output. So here you’re already in a go part of your template, you can’t introduce {{ .Get 0}} like this.
For this kind of purpose we usually use printf like so:
printf "%s.md" (.Get 0)
You may need to put additional parenthesis around the whole expression so that it’s considered as one argument by the GetPage function.