markdown-folder-to-html
markdown-folder-to-html copied to clipboard
Ability to add captions
I would like to display the alt tags of an image as captions in HTML. My current solution is to add this code to the template.html:
<script>
document.querySelectorAll('article img').forEach( img => img.outerHTML = `<figure>${img.outerHTML}<caption>${img.alt}</figcaption></figure>`);
</script>
This does work (if JS is enabled) but it would be nice to have a built-in option for generating images as proper figures when building the pages instead of having to do it client-side.