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

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

Closed
mtkerbeR opened this issue Mar 28, 2021 · 1 comment
Closed

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

mtkerbeR opened this issue Mar 28, 2021 · 1 comment
Labels
bug an unexpected problem or unintended behavior

Comments

@mtkerbeR
Copy link

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?

@jimhester jimhester added the bug an unexpected problem or unintended behavior label Mar 29, 2021
@jimhester
Copy link
Member

Thanks for opening the issue, this should now be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants