Closed etiennebacher closed 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.
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.
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
Cool cool. Yeah, also easier for us for sure.
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
Ok perfect, thanks
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 andhtml_preview: TRUE
in the template preamble, we should keep itFALSE
.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