This repository contains the source code and data for the Bryophytes of the Pacific Northwest site.
The project is built using R, RStudio, and blogdown.
It also requires Node.js and npm for frontend dependencies.
You can see the deployed site at https://imerss.github.io/pnw-bryo-atlas/.
Before building the site, ensure the following are installed:
- Download and install R: https://cran.r-project.org/
- Download and install RStudio Desktop: https://posit.co/download/rstudio-desktop/
-
Download and install Node.js (which includes
npm): https://nodejs.org/en/download/ -
Verify installation:
node -v npm -v
Once R and RStudio are installed, open the project in RStudio and install required R packages (if not already installed):
install.packages(c("blogdown", "googledrive", "tidyverse", "stringr"))After cloning this repository for the first time, perform the following setup steps:
-
Install Node.js dependencies:
npm install
-
Authenticate with Google Drive:
source("R/authenticate.R")This will open a browser window prompting you to log into your Google account and grant access. You may need to re-run this step periodically if credentials expire.
There are two main ways to build the site:
-
Open the project in RStudio.
-
Use Build > Build Website in the RStudio IDE or run the following in the R console:
blogdown::serve_site()
If only the spreadsheet content has changed you can quickly regenerate content without a full rebuild:
source("R/generate_pages.R")This approach saves time when there are no updates to the image files or observation catalogue to process.