- styles.css
- favicon.ico
- ladal_icon_cas_tran_white.png
- _navbar.html
- jquery.tocify.css
- default.html
The three files to be added: styles.css, favicon.ico and ladal_icon_cas_tran_white.png can all just be pasted into the root of the site, the same directory that contains the _site.yml and Rmd files.
It can't cause any damage if these files are added to the wrong place.
We are going to change two files used as templates by pandoc - one of the tools used by RStudio to turn Rmd into HTML. Care must be taken modifying the two existing files. I suggest you create a backup in place by adding .bak as a file extension and keep a copy of the original files in another location - presumably in git.
I have tested this procedure on mac and linux.
We are looking for a directory in RStudio called '/rmarkdown/rmd/h/'. To locate the directory we need from the RStudio console run the command:
bookdown:::bookdown_file('../rmarkdown/rmd/h/')
This should result in something like: "something/something/site-library/bookdown/../rmarkdown/rmd/h/" This directory 'h' is where we need to make changes.
_navbar.html
in the root of the directory is generated by the build-navbar.Rscript script, which hacks around the Rmarkdown internals to use the branded template for the navigation bar. This script reads from the _navbar.yml
file to generate the new navbar - if _navbar.html
is present that is always used, so if the yaml file is updated this script will need to be run again.
In the same directory as above ..../rmarkdown/rmd/h/ should be a file: 'default.html'
Back it up as default.html.bak make a copy and save it in git.
Then copy the new default.html over it.
This file is in a subdirectory of 'h'
In the directory ..../rmarkdown/rmd/h/tocify should be a file: 'jquery.tocify.css'.
Back it up as jquery.tocify.css.bak make a copy and save it in git.
Then copy the new jquery.tocify.css over it.