Skip to content

build_readme does not work if Readme.Rmd is located in inst/ #2333

@mtkerbeR

Description

@mtkerbeR

First of all, thanks for the great package.

I ran into problems when trying to knit a Readme.Rmd-File localized in folder inst/
This seems to be caused by the function build_readme computing the variable readme_path not relative to path, but only uses the filename part, resulting in "Readme.Rmd" instead of "inst/Readme.Rmd".

Using package fs, this could probably solved by changing the code to
readme_path <- path_rel(dir_ls(dirs, regexp = "readme[.]rmd", ignore.case = TRUE), start = path)

Separately (and unrelated), if readme.Rmd is located in inst/, should Readme.Rmd be rendered to the package home directory as Readme.md, e.g. by setting output_dir = path in the call to build_rmd via ... as default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions