With a content layout like:
/content
_index.md
pagedir/index.md
image.jpg
Refrencing an image in a shortcode works nicely in pagedir/index.md
but how can I reference image.jpg when calling a shortcode in _index.md
? Is it possible yet?
I feel like I should just be able to do this in the shortcode
{{ $src := .Resources.Match (printf "*%s*" (.Get "src")) }}
And in home page _index.md
do:
{{< figure-imgsrc src=“pagedir/image.jpg” >}}
But I get the impression from an hour of reading that it’s not currently possible.
Failing that how can I keep several images available for the homepage _index.md
without just messily dropping them into content/
or treating them as assets? (They really are just home page content.)
I want to process the images in a shortcode too.