rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.74k stars 331 forks source link

build_site() should accept absolute paths as build_rmd value #717

Closed maelle closed 2 years ago

maelle commented 2 years ago

If one uses an absolute path as build_rmd value when calling build_site(), this line

https://github.com/rstudio/blogdown/blob/904b48bf79f3e4fd1f1bfe83dc89f55728ff0d49/R/render.R#L130

makes blogdown believe the file is outside the content directory.

blogdown:::rel_path(blogdown:::content_file())
# "content"
xfun::is_sub_path(
  "~/Documents/ropensci/WEBSITE/roweb3/content/blog/2022-08-02-working-with-qualtrics-data-importing/index.Rmd",
  "content"
)
# FALSE

Checklist

When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:

yihui commented 2 years ago

Should be fixed now. Thanks for the suggestion!

maelle commented 2 years ago

Thank you! :rocket: