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

Feature request: Add the equivalent of rmarkdown::draft() to this package #42

Closed
remlapmot opened this issue Aug 10, 2022 · 1 comment · Fixed by #45
Closed

Feature request: Add the equivalent of rmarkdown::draft() to this package #42

remlapmot opened this issue Aug 10, 2022 · 1 comment · Fixed by #45
Labels
enhancement New feature or request

Comments

@remlapmot
Copy link

I tried to include a skeleton.qmd file as a skeleton file in an R package like I would with a skeleton.Rmd file.

Unfortunately, for the package user rmarkdown::draft() doesn't behave as expected because the skeleton.Rmd filename is hardcoded here. All the files from the skeleton directory are copied but the skeleton.qmd file is not renamed.

An example is as follows.

remotes::install_github("remlapmot/mytestpackage", quiet = TRUE)
rmarkdown::draft("example.qmd", template = "quarto_template", package = "mytestpackage", edit = FALSE)
#> Warning in file.rename(file.path(dirname(file), "skeleton.Rmd"), file): cannot
#> rename file 'example/skeleton.Rmd' to 'example/example.Rmd', reason 'The system
#> cannot find the file specified'
dir("example")
#> [1] "skeleton.qmd"

Created on 2022-08-10 by the reprex package (v2.0.1)

Is there different advice how to include Quarto templates in R packages, or would you add the equivalent of rmarkdown::draft() to this package, or maybe allow rmarkdown::draft() to accept skeleton.qmd files?

@cderv
Copy link
Collaborator

cderv commented Feb 27, 2023

Related discussion topic: quarto-dev/quarto-cli#4413

@cderv cderv closed this as completed in #45 Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants