-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
Relative dependencies closer to root than an output html #472
Comments
Did this use-case sit for a year with no viable workaround except spamming symbolic links after the fact, or did you push something in the mean time to address it? That closed thread claimed the lib_dir would be relative to the .Rmd and that is not the case, it would be relative to the html being generated. I suppose it is easy enough to do a " find .html -exec ". Plus while writing this I made the sub-directories flatter, so I would need only one symbolic link, so I guess closing, but still interested in if there is a better way to do this yet? If you want to know the business use-case it is this: Suppose you are generating 100s of reports each of which is a detail link in a master top level report, and each of which needs style files. If you put self-contained false you get 300mb of style files for 100 reports. Needless. The actual use case in the example I am working on is a top level report on all gene-ontologies in an RNA-seq experiment, and the sub-reports are specific gene-ontologies with specific gene details. The top report and the sub-report should ideally share a lib directory, and there are 100s of gene-ontologies so it makes no sense to duplicate lib directories for each report. Such a file organization is
created with 2 .Rmd
sub_report.Rmd can handle multiple repeated outputs through an R global environment variable, and output_dir and output_file arguments of render support placing sub_report1.html and sub_report2.html in the appropriate output directory, but is there no way to have a yaml reference the lib_dir above them? Right now the work around is just put sub_level/symbol_link. Which is viable. Closing. |
I think the workaround you have is the right one. There are a lot of different codepaths that hit lib_dir so any change we make has some regression risk. Not saying we can't/won't change the behavior but it has to be done carefully and ideally with some more tests in place. |
Would love to see this reopened, along with the possibility of setting output_dir in the YAML front matter. The workarounds are tedious and symbolic links don't fix the issue of duplication on the web. |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
This when generating html this yaml errors when the lib_dir line is included (but not when the css line is included, so is it not checked in the same way?) Which leads to the question is there an rmarkdown idiomatic way to include a lib directory closer to root than the output? Is there someway to disable the check that errors? Thanks.
Error message and call stack
The text was updated successfully, but these errors were encountered: