Repository navigation
site_generator() stops search at RStudio project root - #2345
Merged
Merged
Conversation
yihui
approved these changes
Apr 8, 2022
yihui
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me. Thanks!
do you think it should also be stopped at
.Rprojlevel ?
Not sure about this one. Probably harmless to do the same thing there. I'm okay no matter if you want to do it or not.
[skip ci]
site_generator() stops search at RStudio project root
j-magnolia
pushed a commit
to j-magnolia/rmarkdown
that referenced
this pull request
May 5, 2022
* jg-devel: use tufte::tufte_handout in test, and remove tufte_handout in doc mark tufte_handout() as defunct CRAN release v2.14 typo in NEWS Update arrow.theme regarding accessibility Adapt test snapshots to last pandoc devel 2.18+ (rstudio#2349) Revert "remove from NEWS as pandoc devel reverted the change" remove from NEWS as pandoc devel reverted the change Support for `fold-none` class in `html_document()` (rstudio#2348) Support new scheme for Pandoc nightly build Add lua-based codefolding feature and apply it to html_vignette (rstudio#2340) `site_generator()` stops search at RStudio project root (rstudio#2345) Update CONTRIBUTING.md Update tests following Pandoc change in 2.18 (rstudio#2334) dirname('.') returns '.', which will cause infinite recursion, so normalize the relative path to absolute before the next recursion (fix rstudio#2339) Fix parsing by pandoc of last paragraph in shinyrmd doc (rstudio#2337)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #2344 by making sure that we don't look too far up the folder trees when looking for a project root.
I added a
stop_whencondition which should be a function that will take the currentdiranalysed and returnTRUEis stop condition is met. This allows to keep theproj_rootfunction quite generic. However, we could maybe internalize the stop condition ?proj_root()is also used in herermarkdown/R/shiny_prerendered.R
Line 330 in 04a8beb
do you think it should also be stopped at
.Rprojlevel ?I am not sure as the main issue here is to prevent the RStudio IDE to wrongly decide it is a project website to build.