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

Moving the conditional formatting vignette to an article #789

Closed
wants to merge 4 commits into from

Conversation

olivroy
Copy link
Collaborator

@olivroy olivroy commented Sep 6, 2023

Addresses #786

Since the vast majority of images is in the conditional formatting vignette, I think this is enough to close the issue.

Edit: source https://r-pkgs.org/website.html#vignettes-and-articles

https://r-pkgs.org/website.html#non-vignette-articles

Content that involves a lot of figures, which cause your package to bump up against CRAN’s size constraints.
The ggplot2 package presents several FAQs as articles for this reason.

@JanMarvin
Copy link
Owner

Hi @olivroy , thanks for moving forward. I'm not really a huge fan of moving vignettes to articles. For this I prefer the quarto book. At least that creates html and pdf and will survive if pkgdown for whatever reason goes out of order. The entire package size thing is a bit random. I get that CRAN has size limits, but their binary file size varries a lot, which probably is related to nobody ever being able to reproduce their build infrastructure.

PS: I'm on a little vacation for the week and will be back on Monday.

@olivroy
Copy link
Collaborator Author

olivroy commented Sep 6, 2023

enjoy your vacation !

I think a feature like r-lib/pkgdown#2205 sounds good for showing the imageless version on cran and only the one with images online.

@JanMarvin
Copy link
Owner

The issue was closed in pkgdown. Do you want to carry this forward @olivroy ? I’m not sure that we will be able to get rid of the size note everywhere, but at least we could try.

If I understand the issue correctly, we can have an article version for the pkgdown website and a trimmed down vignette for the package.

@olivroy
Copy link
Collaborator Author

olivroy commented Aug 14, 2024

Not sure here. I wonder how we plan to keep them in sync..

@JanMarvin
Copy link
Owner

We could have a single Rmd file which includes graphics or urls depending on the article type or directory?

I would have preferred, if pkgdown would provide an option to include graphics only in the pkgdown documentation and not in the vignette. But maybe we can create something like this ourselves. After all it might be something like:

# similar to testthat::on_cran()
if (!interactive() && !isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false")))) {
  # so something like provide an url or so
} else {
  knitr::include_graphics("img/...")
}

But still not sure, how we can pass the images to pkgdown and exclude them from the tar file. Maybe knitr allows adding remote graphics.

@olivroy
Copy link
Collaborator Author

olivroy commented Aug 14, 2024

I have an idea! will propose something later

@olivroy olivroy closed this Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants