inbo / INBOmd

An R package with a collection of RMarkdown styles and templates. Elaborate examples are available at https://github.com/inbo/INBOmd_examples
https://inbo.github.io/INBOmd
GNU General Public License v3.0
11 stars 2 forks source link

Enforce the use of fig.alt in gitbook? #76

Open ThierryO opened 2 years ago

ThierryO commented 2 years ago

I found that bookdown::gitbook has a fig.alt chunk option. This allows to set the alt tag. Which is useful for visually impaired readers.

We could detect at runtime if fig.alt is set. And issue a warning or error when it is missing. E.g. https://github.com/jumpingrivers/hugo-rmd/blob/736d5e91e1c75aed245cb574d82dd7ccb15234b1/R/hugo.R#L73