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

Using a distill vignette on CRAN #507

Open
AAoritz opened this issue Apr 8, 2024 · 1 comment
Open

Using a distill vignette on CRAN #507

AAoritz opened this issue Apr 8, 2024 · 1 comment
Labels
question general questions - not an issue

Comments

@AAoritz
Copy link

AAoritz commented Apr 8, 2024

The vignette of our package using distill renders well on our pkgdown website. On the CRAN server however there are several issues:

  • Header: Author list, package icon
  • Links in figure captions
  • Labels in plots (e.g. alluvial plot)

Any clue why?

@cderv
Copy link
Collaborator

cderv commented Apr 8, 2024

under pkgdown, I don't think the vignette format applies. pkgdown will use its own rendering and format to render in the website. See https://pkgdown.r-lib.org/reference/build_articles.html

Vignettes are rendered using a special document format that reconciles rmarkdown::html_document() with the pkgdown template. This means articles behave slightly differently to vignettes, particularly with respect to external files, and custom output formats. See below for more details.

So you can't really compare a vignette on CRAN and an article in a pkgdown website. The will look different.

Regarding your vignette, I looked at the source at https://github.com/ropensci/nuts/blob/main/vignettes/nuts.Rmd
You are using knitr engine for your vignette

vignette: >
  %\VignetteIndexEntry{nuts: Convert European Regional Data in R}
  %\VignetteEngine{knitr::knitr}

https://github.com/ropensci/nuts/blob/e50280efc18410b582e9eb9478af52e1f9e9106c/vignettes/nuts.Rmd#L12

This won't take into account rmarkdown format. It will be different that rmarkdown vignette engine.

I would suggest you read a bit more about how vignette are created, and works with R Markdown. Here are some resources that can help

Currently you are asking to use the knitr::knitr engine for vignettes, which is the R Markdown v1 historical engine documented at https://cran.r-project.org/web/packages/knitr/vignettes/knitr-markdown.html. A few packages provide their own vignette engine like markdown or minidown which will use their own rendering and formatting.

Remember that for vignettes R Markdown provides html_vignette format, because CRAN has constraints on file size and how resources are found. Using a complex format like distill will require some checks about size and how to include necessary resources in the package.

Hope this helps understand the situation here.

@cderv cderv added the question general questions - not an issue label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question general questions - not an issue
Projects
None yet
Development

No branches or pull requests

2 participants