codecheckers / register

Register of CODECHECK certificates
https://codecheck.org.uk/register/
Other
6 stars 2 forks source link

Render for filter register by venue #64

Closed angelina-momin closed 2 months ago

angelina-momin commented 3 months ago

Related to changes in this PR of the codecheck package: https://github.com/codecheckers/codecheck/pull/40

nuest commented 2 months ago

I would really like to have only one libs folder - can we fix that path in the rendering?

angelina-momin commented 2 months ago

@nuest Good point thanks! I just fixed it.

I found two possible solutions: 1) set a shared "libs" folder during the rendering (I tried this and it does not work). rmarkdown::render( input = temp_md_file_path, output_file = "index.html", output_dir = output_dir, output_yaml = yaml_path, output_options = list(self_contained=FALSE, lib_dir= relative_libs_dir) )

This is a known issue in Rmarkdown package apparently and it has not been fixed yet: https://github.com/rstudio/rmarkdown/issues/146, https://github.com/rstudio/rmarkdown/issues/1859 and PR https://github.com/rstudio/rmarkdown/pull/2199.

2) Write a function that alters the paths to the libs folder for each html file created. This is not the cleanest solution but it does mean we will not have multiple "libs" folder and hence save space.

I decided to stick to this solution for now until the issue related to the former solution is fixed in the rmarkdown package.