rmarkdown
rmarkdown copied to clipboard
Rmarkdown `site_generator` case sensitivity.
Relevant GitHub repo located here. The
bookdown
source files are located inworking-files/book/
.
The gist of the issue is that, at least in my renv
environment, rmarkdown
can only find the site generator indicated by
site: bookdown::bookdown_site
in index.rmd
when the file extension is Rmd
. I.e. rmarkdown
is file extension case sensitive when looking for the site generator. This occurs when I run rmarkdown::render_site
My scenario should be reproducible using the indicated GitHub repo.
I am using the latest remotes
version of rmarkdown
and bookdown
fun::session_info
:
> xfun::session_info()
R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin21.3.0 (64-bit)
Running under: macOS Monterey 12.1
Locale: en_GB.UTF-8 / en_GB.UTF-8 / en_GB.UTF-8 / C / en_GB.UTF-8 / en_GB.UTF-8
Package version:
compiler_4.2.0 graphics_4.2.0 grDevices_4.2.0 renv_0.15.5
stats_4.2.0 tools_4.2.0 utils_4.2.0 xfun_0.32
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:
-
[x] formatted your issue so it is easier for us to read?
-
[x] included a minimal, self-contained, and reproducible example?
-
[x] pasted the output from
xfun::session_info('rmarkdown')
in your issue? -
[x] upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?
-
[x] installed and tested your bug with the development version of the rmarkdown package using
remotes::install_github("rstudio/rmarkdown")
?
The thinking is that, even if naming your files in lowercase rmd
is not best practice, the rmarkdown
package should surely not be broken by this simple case difference.
Does it happen with bookdown ?
It reminds me on this one https://github.com/rstudio/bookdown/issues/1349 which has a PR that I still need to 🤔 about.
In this case I have used bookdown::bookdown_site
but I also tried rmarkdown::default_site
(which doesn't actually exist) which should eliminate the dependency on bookdown. In this case, there is identical behaviour whereby the rmarkdown::render_site
function does not locate the input file if the extension is in lower-case but does if it is in the Rmd
extension (images below).
Figure 1: unable to find site generator
Figure 2: now finds the file but can't run the site generator function
Note the file extension in each figure
Thank you - I'll look closer into this on rmarkdown side.