-
Notifications
You must be signed in to change notification settings - Fork 1
Basic Editing
This page explains the different elements of the editing and publishing process. You may find it more practical to simply follow the Editing Tutorial doc instead.
Note: If you are editing from the Command Line, make sure you've read the Installation & Setup, Files & Directories Guide, and Building & Serving the Site docs.
The basic gyst of our editing workflow is as follows:
- Sync up with the remote servers
- Work on changes in the
stagingbranch (or a sub-branch) - Test our changes locally
- Test them remotely on the staging server
- Merge the
stagingbranch intogh-pages - Test the changes locally again
- Push them to the production site
-
Admin only: If all looks good, then merge
gh-pagesinto master and push tomaster
Luna: Remove the references to master?
Note: depending on which approach you follow in the Updating the Repo section below, some of the above steps may not apply to you.
Note: Please make sure you are always on the staging branch, unless otherwise indicated. Luna: Improve wording here to differentiate btwn git/terminal approach vs. pull requests
Jekyll lets you write pages in either Markdown or HTML. You will probably find it easier to write pages in Markdown, unless you are already familiar with HTML. While HTML allows for greater control, it requires greater proficiency. Feel free to consult this Markdown Cheatsheet, or this HTML Cheatsheet.
You can use HTML in Markdown files, and vice-versa. The file extension determines what your main mode of writing will be. See the Editing Techniques doc for more info.
Pages should include the following metadata at the top of the file (Note: the opening and close --- are essential for Jekyll to process the metadata correctly):
---
layout: default
class: contact
title: Contact
permalink: /contact/
---For the layout field, you can use any of the layouts in the _layouts directory.
New pages go in their respective years or collections. For example, to add an Agenda page to the 2016 conference, you would create the agenda.md file in the get2016 folder (full path: get2016/agenda.md). To add a Sponsor to the 2015 site, you would create a file collections/_sponsors2015/sponsor_name.md. Luna: See if I can consolidate this paragraph with the one below the list.
Collections are a way to organize the subsections of the site's pages by content.
The site currently uses collections for the following:
- 2012 Agenda
- Awards Presenters
- Awards
- Breakout Leaders
- Discussion Leaders
- Expos
- Judges
- Labs
- Media Partners
- Moderators
- Organizers
- Prototypes
- Speakers
Each collection folder is named in the following format: _speakers2016, _discussion-leaders2010, etc, and can be found in its relative collections folder. Example: for the 2013 Speakers, the folder will be collections/_speakers2013. For the 2013 Labs, the folder will be collections/labs2013.
All of the people-based collections (i.e. judges, leaders, moderators, organizers, presenters, prototypes, speakers) use the following format:
---
name: George Church
last: Church
image: /get2010/images/George-Church.jpg
---
George Church is Professor of Genetics, Harvard Medical School, Director of the Center for Computational Genetics. He is the founder of the Personal Genome Project (PGP), Chairman of PersonalGenomes.org, and PGP#1. He is the recipient of the Franklin Institute's 2011 Bower Award and Prize for Achievement in Science.Note: the Judges collection also has an order field, so that judges appear in the proper order on the page. See if I can fix the page code so that the order field is no longer necessary
Awards
---
title: Diversity
image: /get2016/images/Diversity-120.jpg
alt: Diversity-120
---
This award recognizes excellence in promoting diversity in human research.
**Award Champion**: [Health Data Exploration Project (HDE)](http://hdexplore.calit2.net/), with support from the [Robert Wood Johnson Foundation](http://www.rwjf.org/)Expos
---
name: C3-PRO
link: http://researchkit.org/blog.html#article-10
image: /get2016/images/C3_PRO.jpg
---
[C3-PRO](http://researchkit.org/blog.html#article-10): Consent, Contact, and Community framework for Patient Reported Outcomes is a "backend" connecting any ResearchKit app to a widely-used clinical research IT infrastructure called i2b2. C3-PRO relies FHIR (Fast Health Interoperability Resources). We are making C3-PRO available to the broader research community to be used with their ResearchKit apps and also integrating with ResearchStack.Media Partners
---
name: hdexplore
image: /get2016/images/hde-long.jpg
facebook: http://hdexplore.calit2.net/news/
twitter: https://twitter.com/hdexplore
---Once you're totally done with your page or collection/subsection [Luna: pick word], you have two options:
- Go to the PGP Global - Staging repo and manually add the pages with the editor there.
- Commit locally and then push to to the staging repo
- Finish the page on your computer, then navigate to the the PGP Global staging repo. The relevant links are:
Luna: I need to totally rewrite these links
- Finished Pages: https://github.com/pgpglobal/staging/tree/staging/collections/_pages
- Author Page: https://github.com/pgpglobal/staging/tree/staging/collections/_authors
Note: You must be on the staging branch. This has been accounted for in the above links already. Please make sure you see Branch: staging, as shown in the image below: Please do not add new pages to the gh-pages or master branches unless you are an admin.

-
Click create new file, then edit or copy & paste your page into the editor there. Scroll down to the bottom fill out the fields under
Commit New File. Your commit message can be as simple as "My name: finished page 'page_name'". Note: Please include "Archives not regenerated" in the body of your commit message. -
Select "Create a new branch" and name it
your-name-finished-pages. Then click "Propose new file". On the next screen, include any relevant notes, and then clickCreate Pull Request. -
Repeat this process for the Author page
That's it - you're done!!
Add New Files
For any new files, type git add filename. You can add multiple files in a single command (ex: git add collections/_pages/page_name collections/_authors/aname.md).
Commit Your Changes
In your terminal, type git commit -am "Your commit message here". Commit messages should be less than 80 characters and follow a format such as Add Page Name and Author page, Add Page Name, Fix xyz on Page/Page Name, etc.
- The
-aflag stands forall(meaning commit all modified files) - The
-mflag stands for message. This lets you type a simple one-liner message as the commit message. If you need to provide more details for whatever reason, then leave this off, and git will open up your text editor, so you can write a longer message. - You can also commit one file at a time by typing
git commit filename -m "Your commit message here"
Merge Your Changes
If you've made a separate branch for your editing then run git checkout staging followed by git merge branch_name. Alternately push your new branch to the repo, and open a Pull Request (see Step 3 in the Manually Adding The Pages Or Pages On Github) section.
Push Your Changes to The Staging Repo
Type git push to push to the staging site. If you get an error it means you haven't set up your branch tracking properly. Type git push staging staging:gh-pages instead.
See the Installation & Setup and Using Git docs for additional info.