Skip to contents

Development Tips

Document Development

Documentation for MIRA is hosted on a github pages site, generated by Github Actions running the pkgdown library in R.

You can view documentation changes on your local windows machine running WSL2 by installing R and R studio.

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
sudo apt install -y r-base r-base-core r-recommended r-base-dev gdebi-core build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev
wget https://rstudio.org/download/latest/stable/server/"$(lsb_release -cs)"/rstudio-server-latest-amd64.deb
sudo gdebi rstudio-server-latest-amd64.deb

The following ubuntu dev tools are required for the latest versions of R and pkgdown

sudo apt-get install libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev

Run Rstudio

sudo rstudio-server start

Access your Rstudio server at http://localhost:8787. Note: The user name and password are the same as your Linux system’s.

In Rstudio, navigate to File -> New Project and select your local MIRA clone directory. This will create a file inside the MIRA repo called MIRA.Rproj, which should be getting ignored by git via .gitignore.

Install the latest version of pkgdown in Rstudio’s Console with

install.packages("devtools"); devtools::install_github("r-lib/pkgdown")

To build the site with your latest changes, run