How to contribute to the website with RStudio
Contributing using RStudio
(tested on RStudio 2024.04.2 Build 764 for OSX)
Note: You need to have git installed and you need to generate a personal authentication token in your github account to be able to push your changes to the remote repo.
This has an advantage that you can edit .qmd files in visual mode and paste screenshots without having to explicitly save and link images.
- Go to File -> New Project
- Select “Version control”
Paste the git repo http path:
https://github.com/visualneuroscience/visualneuroscience.github.io.git
Edit the local version as you wish
When finished editing, go to “Build” tab and press “Render Website”. This will render htmls and other aspects of the website structure, and open the current page in the browser.
If you are happy switch to the “Git” tab, select either all or some files, stage and commit. After this, press “Push” to send the new content to github repo
Every time you start editing the R project, first press “Pull” to make sure your local version contains all the most recent changes, which may have been made by others.
Note on Windows
The difficulty on windows PC in the office has been the extreme slowness of the Git Gui window. The solution is to use the terminal (not the R console!) to commit changes and push:
git add *
git commit -m "yourmessage"
git push