Skip to content

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

@remlapmot

Description

@remlapmot

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions