etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
67 stars 9 forks source link

README assumptions and structure #109

Closed vincentarelbundock closed 11 months ago

vincentarelbundock commented 11 months ago

The code here is a bit obscure for me: https://github.com/etiennebacher/altdoc/blob/main/R/utils-rmd.R#L3

What assumptions are we making about the README? I imagine that we want to support 3 types of readme: .md, .Rmd, and .qmd.

The default folders in which images are stored probably differ.

Where should users store static images if they have any?

etiennebacher commented 11 months ago

I imagine that we want to support 3 types of readme: .md, .Rmd, and .qmd.

The README is a special case because it already has to be rendered to .md to appear on Github/Gitlab so we don't have to render it ourselves. This is why I hardcoded the filename "README.md" in the code linked.

Where should users store static images if they have any?

Many places possible: in issues (I think you did that at some point?), in man (like withr), in inst...

A way to do it is:

I think the code linked above already does that and it works fine for withr.

What do you think?


Edit: doesn't work with cli, which also stores README images (and man page images) in man: https://github.com/r-lib/cli/tree/main/man/figures/README