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 Quarto articles #2015

Closed
wants to merge 8 commits into from
Closed

Support Quarto articles #2015

wants to merge 8 commits into from

Conversation

olivroy
Copy link
Contributor

@olivroy olivroy commented Jul 4, 2024

Now that upcoming pkgdown version supports them!

fixes #1997

With the release of pkgdown 2.1, I think it is worth adding to usethis!

I set overwrite = FALSE to setting the VignetteBuilder field. Not sure how having quarto and rmarkdown vignettes will work. I can do more testing after review!

Would need the following too in Rbuildignore https://github.com/r-lib/pkgdown/pull/2656/files

^vignettes/\.quarto$

Copy link
Contributor

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be super helpful! I suggested a few changes, but this is well on its way! You'll also need to resolve a merge conflict in the NEWS.md (I couldn't fix that piece).

@@ -13,40 +13,60 @@
#' @param name Base for file name to use for new vignette. Should consist only
#' of numbers, letters, `_` and `-`. Lower case is recommended.
#' @param title The title of the vignette.
#' @param type One of `"quarto"` or `"rmarkdown"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#' @param type One of `"quarto"` or `"rmarkdown"`
#' @param builder One of `"quarto"` or `"rmarkdown"`

type is a little over-generic and could collide with another param. Let's use the more-specific builder (to match "VignetteBuilder"). If you go with this change, it needs to be changed throughout.

Copy link
Contributor Author

@olivroy olivroy Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed that type may not be ideal. If we were to go with builder, the arguments should be updated to "knitr" instead of "rmarkdown"?

Maybe ext = c("qmd", "rmd") would work too.

Maybe there should be an option

options(usethis.vignette = "quarto") to avoid specifying it everytime?

I can imagine myself deciding to stick with a single type, and not have to specify it everytime.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like ext, and an option would be great!

R/vignette.R Show resolved Hide resolved
inst/templates/vignette.qmd Outdated Show resolved Hide resolved
inst/templates/vignette.qmd Outdated Show resolved Hide resolved
R/vignette.R Outdated Show resolved Hide resolved
R/vignette.R Outdated Show resolved Hide resolved
inst/templates/article.qmd Outdated Show resolved Hide resolved
Copy link
Contributor Author

@olivroy olivroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for your helpful comments! I will get this in a better shape

inst/templates/article.qmd Show resolved Hide resolved
@jennybc
Copy link
Member

jennybc commented Aug 15, 2024

Thanks to both @olivroy and @jonthegeek! I won't be able to complete thinking about this and merge this today, but I will definitely do so soon. And we're clearly very close!

@coatless
Copy link
Contributor

@jennybc not sure when you'll have cycles next; but, if you could hint at any changes required to take the Quarto vignette action across the finish line, I'm happy to help.

@coatless
Copy link
Contributor

Gentle bump on adding Quarto vignettes into use_vignette() via builder = "quarto".

@jennybc
Copy link
Member

jennybc commented Nov 12, 2024

I will come back to this soon, as I need to release usethis for CRAN reasons.

@jennybc
Copy link
Member

jennybc commented Nov 22, 2024

@olivroy Thanks again for getting this ball rolling. Returning to this task, I just found it easier to tackle it myself de novo, in #2085. I will make sure to give you a shout out in the NEWS.

@jennybc jennybc closed this Nov 22, 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.

Should use_vignette support quarto?
4 participants