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

Support vignette on CRAN but excluded from pkgdown website #2205

Closed
cbailiss opened this issue Oct 4, 2022 · 4 comments · Fixed by #2497
Closed

Support vignette on CRAN but excluded from pkgdown website #2205

cbailiss opened this issue Oct 4, 2022 · 4 comments · Fixed by #2497
Labels
articles ✍️ feature a feature request or enhancement
Milestone

Comments

@cbailiss
Copy link

cbailiss commented Oct 4, 2022

Feature request: Allow vignettes to be excluded from the pkgdown website but still present in the R Project, e.g. for CRAN.

Example: I have two versions of vignette - one is shorter for CRAN (builds in less time to meet CRAN constraints) and a longer more detailed version for the pkgdown website. Previously I could simply omit vignettes from the _pkgdown.yml file index contents (and a warning would be issued) however now an error is generated.

A couple of ideas:

  • A new setting where vignettes to be ignored can be listed.
  • A new setting that specifies to raise warnings instead of errors if vignettes are missing from the index.

For related discussion see #2202 and #2055.

@dbosak01
Copy link

I have a related use case where I have a page that I want on the pkgdown website, but not in the Articles menu. I have it linking from the top navbar instead. It is a Frequently Asked Questions page that I think should be visible as soon as the user enters the site. So I need the page compiled and added to the site, but not included in the Articles list. I was able to to this on previous versions of pkgdown. Now it seems difficult or impossible given the new restrictions, which (honestly), I can't understand. It seems a warning would have been sufficient.

@maelle maelle added this to the 2.1.0 milestone Oct 20, 2022
@keller-mark
Copy link

keller-mark commented Jan 10, 2023

I have a similar use case as above @dbosak01. Pkgdown site here for reference: https://vitessce.github.io/vitessceR/

I include articles on my site by including them in the navbar -> components part of the _pkgdown.yml configuration https://github.com/vitessce/vitessceR/blob/main/pkgdown/_pkgdown.yml#L14 rather than articles. This allows me to create a more custom navbar that separates articles into multiple sections (Examples and Articles), use sub-headings in the dropdowns, and add a link to an external documentation website.

I now need to pin to pkgdown v2.0.4 because my site does not build in the current version.

A parameter for build_site that allows downgrading this behavior to a warning rather than an error would be great

@hadley
Copy link
Member

hadley commented May 7, 2023

I'd suggest we handle this the same way as references: if a section has title "internal", we silently drop it — i.e. data_articles_index_section() gains an is_internal field and then data_articles_index() removes from the list after the check for missing articles.

@hadley
Copy link
Member

hadley commented Apr 24, 2024

If anyone is still interested in this issue, I'd really appreciate any reviews of the associated PR: #2497

hadley added a commit that referenced this issue Apr 28, 2024
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
articles ✍️ feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants