Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caption syntax #79

Open
danmackinlay opened this issue Sep 9, 2020 · 1 comment
Open

caption syntax #79

danmackinlay opened this issue Sep 9, 2020 · 1 comment

Comments

@danmackinlay
Copy link

In standard blogdown the default syntax supports figure captions

![[A girl and her plushie by Bart](https://www.flickr.com/photos/cayusa/2858037869/in/photolist-GkcJmx-7ZdhFy-BYDdfd-5mycbP-BBLDmW-5mycCk-7Za3ZV-6BgA4-5mycqX-5myc5Z-zXDD-57YdkC-35rkdE-7nNE2w/)](/images/girl_cthulhu.jpg)

rendered as

<div class="figure">
<img src="/images/girl_cthulhu.jpg" alt="">
<p class="caption"><a href="https://www.flickr.com/photos/cayusa/2858037869/in/photolist-GkcJmx-7ZdhFy-BYDdfd-5mycbP-BBLDmW-5mycCk-7Za3ZV-6BgA4-5mycqX-5myc5Z-zXDD-57YdkC-35rkdE-7nNE2w/">A girl and her plushie by Bart</a></p>
</div>

AFAICT hugodown will render captions as alt attributes and does not support captioned figures.
Is that correct? I should put it in the docs if so (possibly in the features matrix of hugdown vesus blogdown)

@maelle
Copy link
Contributor

maelle commented Sep 10, 2020

Slightly related, to be able to use captions and other options of Hugo's figure shortcode, for rOpenSci I had defined a custom plot hook (I can't remember whether I tested it with hugodown) https://github.com/ropensci/roweb2/blob/master/archetypes/Rmd/index.md#L51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants