hugo: Markdown does not render in figure shortcode

What version of Hugo are you using (hugo version)?

Hugo Static Site Generator v0.60.1-96066756 windows/amd64 BuildDate: 2019-11-29T14:57:23Z

Does this issue reproduce with the latest release?

Yes

Issue

I wrote the following figure shortcode:

{{< figure src="/img/imagename.png" caption="Image caption (Source: [Website Name](https://www.example.com))" >}}

I expected the markdown in the caption to be rendered, as documented. After running the hugo command locally, it generates this output:

<div class="box" >
  <figure  itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
    <div class="img">
      <img itemprop="thumbnail" src="https://ahelwer.gitlab.io/img/imagename.png" alt="Image caption (Source: [Website Name](https://www.example.com/))"/>
    </div>
      <figcaption>
          <p>Image caption (Source: [Website Name](https://www.example.com/))</p>
      </figcaption>
    <a href="https://ahelwer.gitlab.io/img/imagename.png" itemprop="contentUrl"></a>
  </figure>
</div>

So the markdown is not rendered. I see the related feature request #4406 was closed as completed last year.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@ahelwer No, it needs to be opened on that’s specific theme’s repo: https://github.com/halogenica/beautifulhugo

The HTML looks fine… seems like you need to fix some CSS? In any case, you should now move this discussion to the Hugo Discourse forum.