There are two problems here. Firstly, this line src="{{ $image.RelPermalink }}" doesn’t seem to work. Secondly, Hugo doesn’t like me putting {{.Params.title | markdownify}} before the {{end}}. What’s the proper way to refer to the post title here?
For info, in the post I have image: "/images/900-2.jpg" in my YAML.
The docs states that content inside the static/ directory is copied as is.
If you need to process the image, it should be placed inside the assets/ directory, or the one you’ve specified in your configuration file for the key assetDir.
assets/images/900-2.jpg
Take a look to the Hugo Pipes Introduction from my previous message.
Thanks. I’m still quite new to all these. Now the image problem is sorted. The title issue is still there.
<.Title>: can't evaluate field Title in type string
If I put {{ .Title | markdownify }} outside {{end}} it works. But that’s not exactly what I want. So how do I access the page variable while I’m inside the with loop?
You can’t call a file in static via resource functions. Resources belong into or below the folder of the markdown file. For working on files in static you need to use the imageConfig function.