(Disclaimer: I’m new to hugo!)
I recently discovered the built-in figure shortcode.
I’m wondering why it uses an h4 tag for the caption? It’s not a header and it makes styling a bit more of a hassle.
Is there a way to tell it not to add it?
Thanks!
(Disclaimer: I’m new to hugo!)
I recently discovered the built-in figure shortcode.
I’m wondering why it uses an h4 tag for the caption? It’s not a header and it makes styling a bit more of a hassle.
Is there a way to tell it not to add it?
Thanks!
Welcome to the forums @asm.
To answer your question, you can override the builtin figure shortcode with your own version. Here’s how:
your-site/layouts/shortcodes/figure.html then paste in that code<h4> tags on line 16 with something elseThanks! That helps a lot.
I see from that code that if I use “caption” instead of “title” I get a <p> instead of an <h4>.
Slightly better, but I don’t know why it feels the need to add anything…