Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to edit OHI+ websites #21

Open
jules32 opened this issue Dec 21, 2016 · 1 comment
Open

How to edit OHI+ websites #21

jules32 opened this issue Dec 21, 2016 · 1 comment
Labels

Comments

@jules32
Copy link
Contributor

jules32 commented Dec 21, 2016

New OHI+ websites use RMarkdown and GitHub, and can be updated with the same workflow that we use for OHI score calculations.

This short tutorial about how to work with RMarkdown websites is a good place to learn how to update your website. However, unlike the tutorial, you will have more than on 'branch' on GitHub: a master branch where you have your data and models, and a gh-pages branch that is the website. Here's what you'll need to do:

First time only:

  1. open RStudio, and notice how it says 'master' in the git tab. You are on the master branch.
  2. pull from the master branch
  3. click on the little cog-wheel, and select 'shell'
    image
  4. in the shell, paste or type git checkout gh-pages. This will pull the gh-pages branch to your computer, and present it.
  5. back in RStudio, notice that it now says 'gh-pages' on the git tab. (If it doesn't, click on a different tab and then back to the git tab to refresh)
  6. Make changes to your website like in the RMarkdown websites tutorial
  7. commit, pull, push as normal.

All other times
After that initial time in the shell where you told git that there was another branch you wanted to be able to access, it will be available to you as an option in RStudio. You can switch back and forth but be sure to save, commit, pull, and push to one branch before switching to another.

image

@jules32 jules32 added the how_to label Dec 21, 2016
@jules32
Copy link
Contributor Author

jules32 commented Aug 8, 2018

We're developing a toolbox-training chapter on this as well, with more information:

http://ohi-science.org/toolbox-training/websites

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant