quarto-dev / quarto-dev/quarto-cli
No figure caption with hugo-md
Open
@cderv is already working on this.
Since Oct 23, 2025.
bug
crossref
hugo
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Format hugo-md does not create captions, only alt-text
Steps to reproduce
---
title: Hugo Captions
format:
html:
fig-height: 3
hugo-md:
fig-height: 2.5
---
```{r}
#| label: fig-hugo
#| echo: FALSE
#| fig-cap: "This should be a numbered caption"
plot(rnorm(100))
```
With format: html, there is a numbered caption.
```
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-hugo-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="hugo_caption_files/figure-html/fig-hugo-1.png" class="img-fluid figure-img" width="672">
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-hugo-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure 1: This should be a numbered caption
</figcaption>
</figure>
```
With format: hugo-md, there is no caption, only an alt-text.
```
<img
src="hugo_caption.markdown_strict_files/figure-markdown_strict/fig-hugo-1.png"
id="fig-hugo" alt="Figure 1: This should be a numbered caption" />`
```
Expected behavior
Hugo needs figure captions
Actual behavior
No figure captions
Your environment
No response
Quarto check output
Quarto 1.6.36
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.