Skip to content

callab/co-relab_source

This branch is 2 commits ahead of, 435 commits behind co-relab/co-relab_source:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e69615b · Sep 25, 2019
Sep 17, 2019
Apr 9, 2019
Sep 25, 2019
May 21, 2019
Sep 25, 2019
Sep 17, 2019
Apr 16, 2018
Aug 29, 2019
Aug 28, 2019
Feb 1, 2019
Sep 19, 2019
Sep 25, 2019
Apr 9, 2019

Repository files navigation

Source Blogdown files for the corelab.io website

This repository contains the source files for the CORE Lab webpage (corelab.io).

The site is built in the Blogdown R Package and this repository stores the source Blogdown files. We then use a Netlify.com account, point it to this repository, and it "knits" the source files into .html and other web-compatible files that are published. The domain name ("corelab.io") is registered on namesilo.com, and you enter that information in to Netlify. If lab members can't find the necessary logins/passwords, ask the PI.

The workflow to edit the webpage is to fork the files to your GitHub account, clone the files locally, make any edits, commit and push the changes back to your GitHub account, then submit a "Pull Request" to the main co-relab/co-relab_source branch on GitHub. One of the admins on that account will need to accept those changes before they are official.

Basic steps for CORE lab members to edit the webpage:

  1. Ensure you have R and R Studio installed.
  2. Create a GitHub account.
  3. Fork the repository into your own account:
    https://github.com/co-relab/co-relab_source
  4. If necessary, Install Git (comes with MacOS by default)
  5. Clone (e.g., download the files and create a Git repository on your local hard disk) the repo locally. To do this, first go to the forked repository on GitHub, click the "Clone or Download" button, copy the link. Open a Terminal (or cmd prompt), navigate to where you want the files to be stored on your hard disk (use the 'cd' command in Terminal, which changes your directory), and run: git clone <copied url>

Replace <copied url> with your clipboard.

This will create a new directory on your computer: co-relab_source

  1. Navigate on your computer to the new co-relab_source folder and open co-relab_source.rproj in R Studio.
  2. Also open co-relab_source_rscript.R (the R script) in the same R window. Using R Projects eliminates the need to set a working directory each time (it's automatically set to the folder containing the .rproj file).
  3. In the Terminal of R Studio (or your regular command line), configure the remote repository so you can update your local files with changes from the main repo:
    git remote add upstream https://github.com/co-relab/co-relab_source.git
  4. Each time before you start editing the page, update your local repo and resolve any conflicts. You can do this in R Studio by using the UI interface in the upper right "Git" tab, or via the R Studio 'terminal' (a tab where the Console usually is):
    git fetch upstream
    git checkout master
    git merge upstream/master

If you get conflicts you will have to resolve them before it will let you merge. IF you want to overwrite your local changes with the main repo you can "stash" your files like this: git stash save --keep-index

If you don't want to keep your stashed files, drop them: git stash drop

  1. At this point, just follow instructions in the R script to edit the page.
  2. Once you're done, you'll "Commit" those changes back to your local repository using the "Git" window in R Studio: Checkbox the files you want to commit (usually all of them), then press "Commit". Write a commit message that explains what changes were made, and press "Commit" in the new window.
  3. Then, to "Push" these changes back to your fork on GitHub, press the "Push" button in R Studio.
  4. Finally, submit a "Pull Request" to send these changes back to the original repository and make them live on the webpage: go to GitHub.com, login on your account, and submit a "Pull Request". After this, a website admin (Rick or Hans, at the moment) needs to login to the 'co-relab' GitHub account, and merge the pull request.

Note: You need to be authenticated to your GitHub account on your pc or it will give you an error.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 62.3%
  • CSS 33.6%
  • JavaScript 3.8%
  • R 0.3%