etiennebacher / altdoc

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

Resolve `yaml` options between preamble and existing options #195

Closed etiennebacher closed 9 months ago

etiennebacher commented 9 months ago

When the README already has a preamble, it won't take additional options specified in preamble_vignettes_rmd.yml. We should add these additional options in the original yaml, unless they are already there.

If there's html_preview: FALSE in the README and html_preview: TRUE in the template preamble, we should keep it FALSE.

If there's no html_preview in the README but there's one in the template preamble then we should add it before rendering the README

vincentarelbundock commented 9 months ago

FWIW, I disagree. The whole design idea is that we provide some defaults, but that users can completely override the defaults by inserting a preamble in the file directly.

Playing with altdoc, I've found that it is dangerous to modify preambles or links automatically without explicit user consent or knowledge.

So to me this seems more like a documentation issue.

vincentarelbundock commented 9 months ago

Also, the concept of "you either get the default preamble or the one you wrote" is much easier to understand than a fancy git-merge style automatic change.

etiennebacher commented 9 months ago

That's fine for me. I thought you'd prefer merging preambles automatically to keep altdoc self contained but it's easier for me to just add the option in the README preamble so I won't insist on that.

I'm keeping this open as a note to self to add some docs about this

vincentarelbundock commented 9 months ago

Cool cool. Yeah, also easier for us for sure.

vincentarelbundock commented 9 months ago

FYI, I did document this in both ?setup_docs and ?render_docs

https://altdoc.etiennebacher.com/#/man/setup_docs.md#altdoc-preambles

https://altdoc.etiennebacher.com/#/man/render_docs.md#altdoc-preambles

etiennebacher commented 9 months ago

Ok perfect, thanks