Automatically sign the number of each image (figure)

I have a Markdown file. It has images like this:
![ Some Title](/img/exmpl.png " Some Title")`

Can I automatically number images using hugo so that I get output like example on bellow?

<img src="/img/exmpl.png" title="Some Title" ><figcaption>Fig1. Some Title</figcaption>

Mmmm shortcodes have the .Ordinal property, but I don’t think Mardkown Render Hooks have the equivalent…

It could be an interesting feature though. You should hit the repo and create a new issue (feat. request) unless someone chimes in with a solution that does not involve JS.

1 Like

Thak you. I followed your advaice and create [issue] on the GitHub (