AFAIK, yes using {{<figure>}}
does the job.
If you really want to keep using markdown syntax to include your images. You can use Markdown Render Hooks. (Need to create your own render hook template).
Some related threads about image render hooks:
Thank you very much for the great Hugo 0.62.0 christmas present!
This simple image render hook template uses the image title as an optional caption.
Feel free to adjust and use, if this template fits your use case.
{{ $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) }}
{{ $small := $image.Resize "480x" }}
{{ $medium := $image.Resize "768x" }}
{{ $big := $image.Resize "1024x" }}
{{ $alt := .PlainText | safeHTML }}
{{ $caption := "" }}
{{ with .Title }}
{{ $caption = …
I hear what @alexandros suggests about using a theme with that calls the Pages range.
That said, I like the way the Hugo Flex theme otherwise structures content, and I’d invested too much time in customizing its appearance with my own CSS to readily abandon it for another theme.
So… I’d had the same problem as @agargara . I could not figure out how to get relative links to generate differently for the main page.
Here is my solution, for anyone who runs into this problem in the future.
First, …
1 Like