pawroman / zola-theme-terminimal

A simple, minimal retro theme for Zola
https://pawroman.github.io/zola-theme-terminimal/
Other
346 stars 76 forks source link

Fix markdown in caption of figures #51

Closed heitorPB closed 6 months ago

heitorPB commented 11 months ago

The figure shortcode does not allow Markdown markup in captions. I'm not sure this is by design, but this PR changes it so we can use Markdown in captions.

For example, this snippet:

{{ figure(src="foo.jpg",
          position="center",
          caption="Foo _bar_ **baz** [link](http://google.com)",
          caption_position="center") }}

is currently rendered this way: without-fix

After this patch it becomes: with-fix

Quite handy in my opinion.

heitorPB commented 10 months ago

@pawroman what are your thoughts on this?