I am afraid that I don’t quite have the time to look into the complexity of your setup, in more detail.
Basically you want to fetch {{ figure src="/article-1-1/img1.png" }}
from another Page Bundle under a different section article-2.2/_index.md.
The md5
fingerprinting function is available for Resources.
It is true that getting another Page Bundle’s assets is not straightforward. However the File templates are even more cumbersome (at list in my opinion).
What I would do to simplify my life -if I were in your shoes- would be to map the contentDir
also as the assetDir
.
Then within your figure shortcode I would simply do:
{{ (resources.Get $src).Content | md5 }}
The method to create a Resource from a File that resides relative to the Assets Directory is perhaps the most flexible method to give you what you ask.
In a couple of my projects I have already mapped the contentDir
as the assetDir
and never encountered any problem.
Also perhaps the others can offer a better way to approach this issue.