27  Editing the Website

Author

Nick Lyon

Modified

December 19, 2024

27.1 Github Access

  1. The HerbVar website has been created in R. Ask to be added as a collaborator on this repository.

  2. Fork the website’s repository to your computer. Nick Lyon initially forked the repository so that pushes would be preserved as “pull requests” and could be reviewed by Will before actually changing the website on the internet, but this may be unnecessary depending on your comfort with this type of coding.

27.2 Making Edits

Make whatever changes are asked for or required. Each page of the website is saved as a separate .Rmd file and file names mostly correspond to website tab names so it should be relatively easy to identify which script(s) needs to be changed and implement those edits. The existing scripts also include plenty of examples of heading formatting, font changes, and hyperlinks so use the existing pages to teach yourself how to do things you don’t already know how to do.

27.3 Rebuilding the Website

  1. Once you’ve made the edits, go to the “Build” tab on R Studio and click “Build Website”. This will take several minutes to process (there will be a running list of code as it processes through each .Rmd file) so feel free to grab a cup of coffee as this processes.

  2. Once it completes, it will create a new tab and will pop up the new website in your browser but you are not yet done!

  3. Once that is done, in the Git tab of R Studio, select all modified files (not just the scripts!) and commit/push them all.

  4. Building the website may affect a lot of files in the “libs” folder deep in your system (you can tell how savvy I am about this, huh?) and these changes must also be included in the push for the website to successfully update.

  5. Once you’ve pushed these changes (and if you’re working in a fork, Will has accepted your pull request) the website on the internet should update within 10-15 minutes so double check your work after roughly that amount of time has passed.