Join the uoftbiophysics GitHub organization
- Make a GitHub account and sign in.
- Send your GitHub username to Matt or Jeremy to be added to our GitHub organization.
Fork the website repo
- Go to the website repository.
- In the top right, click "Fork". It should now exist at
https://github.com/YOUR_USERNAME/uoftbiophysics.github.io
.
Clone the forked copy, make your changes, commit and push them
- Install Git locally. You can do everything from terminal or command line, or you can install a git GUI (e.g. SourceTree, GitKraken).
- Clone the forked repo to your computer.
Update the code
- Make changes to the site files.
- Commit then push those changes.
Create a Pull Request
- Go to the original website repo.
- Click "Pull requests" (third tab at the top).
- Click "New Pull Request".
- Selection: pull your forked copy and its changes into the original copy.
- Details: fill out the topic/description, add any reviewers or assignees, and submit.
Syncing a forked repository
If you've already forked the repo and cloned it a while ago, the upstream repository code may have changed. It should be synced before you add more code. There are two approaches to do this:
Web UI
- Navigate to your forked repo at
https://github.com/YOUR_USERNAME/uoftbiophysics.github.io
. - Click "Fetch upstream" (below green Code button). Select "Fetch and merge".
- Locally, use
git pull
to update your copy of the fork.
Command line
- Configure upstream remote (if you haven't yet):
git remote add upstream https://github.com/uoftbiophysics/uoftbiophysics.github.git
- Verify it was added:
git remote -v
- To sync changes, do:
git fetch upstream
git checkout main
git merge upstream/main
- This syncs your local changes. To update your fork on Github you need to
push
any changes.
Prerequisites (details in the links above)
- Install Ruby (under WITH DEVKIT, select option to add to PATH).
- In command line:
gem install bundler
- In command line:
gem install jekyll
Viewing the site
- Open terminal or command line and change directory to the root of the cloned website repository.
bundle install
bundle exec jekyll serve
- Navigate to http://localhost:4000/ and see if it worked.
Troubleshooting:
- A gem file is needed, but should already be on git. In case it isn't, run
> bundle init
to make one. - On windows three lines should be added to the end of the file:
- gem 'wdm'
- gem 'jekyll'
- gem "webrick", "~> 1.7"
- See if
bundle exec jekyll serve
works now.
Prerequisites (details in the links above)
You only need to do this once. Either
- Install all dependencies by running the script
linux-setup.sh
; or - Follow this guide.
Viewing the site
Run the command
$ jekyll serve
and either navigate to http://localhost:4000/ or Ctrl+click the link in terminal for it to open automatically in browser.
Troubleshooting
- If the following code appears
FATAL: Listen error: unable to monitor directories for changes.
Visit https://github.com/guard/listen/blob/master/README.md#increasing-the-amount-of-inotify-watchers for info on how to fix this.
then it is likely your server didn't close properly in an earlier session. You can always increase the number of inotify-watchers by running
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p