.Resource image Shortcode from within another .Page.Resource?

With the following content structure:

content
└── index.md
  ├── text.md
  └── my-image.jpg

Is it possible to render my-image.jpg from within text.md with a shortcode?

The context is lost with {{ $img := $.Page.Resources.GetMatch (.Get 0) }} from within text.md and I’m not sure how to go higher up to the level of index.md

You cannot currently navigate from text.md to index.md, but I guess you should be able to (I kind of forgot):

I don’t know of a current good workaround.

1 Like

Thank you for opening the Github issue.

This feature would be very useful for single page websites.