Skip to content

Instantly share code, notes, and snippets.

@joesepi
Last active May 8, 2017 18:26
Show Gist options
  • Save joesepi/65940bcca159471f827feec0d5e32a19 to your computer and use it in GitHub Desktop.
Save joesepi/65940bcca159471f827feec0d5e32a19 to your computer and use it in GitHub Desktop.
Instructions on contributing content to a Jekyll based Github Pages hosted blog

Instructions on contributing content to a Jekyll based Github Pages hosted blog

How to get setup

If you don't already have Jekyll, run: gem install jekyll

If you don't already have Bundler, run: gem install bundler

If you don't already have the site locally, fork and clone.

To get dependencies run from the site directory: bundle install

How to run Jekyll locally

serve only

bundle exec jekyll serve

serve and watch for changes

bundle exec jekyll serve --watch

serve drafts and watch for changes

bundle exec jekyll serve --watch --drafts

How to checkout Pull Request locally

hub checkout https://github.com/org/repo/pulls/1234

(requires hub to be installed)

How to contribute content

tl;dr

  1. fork; clone; branch
  2. write;
  3. commit post; pull request; merge

More details

  1. If you are not already in the authors file, add yourself
  2. In a local fork, preferably in a branch off of master, write in a markdown file (.md) with at least the minimal meta information at the top of the document
    * optional: a _drafts folder is available if you'd like
    * optional: commit the work to manage "revisions"; push to your remote to keep your work "backed up"
  3. When ready for review (final or incremental), push the post upstream and open a pull request
    * note: if you are looking for comments but not ready to publish, keep the post in the _drafts directory; if you are ready to publish, move the file to the _posts directory and prefix the filename with the date (2015-09-27-my-fence-post.md) before opening the pull request
  4. Colleagues can then view and comment on the post (potentially with a "diff" of a previous version, if one exists in the "upstream")
  5. Once you and the reviewer(s) are satisfied, merge the PR. If the content was moved to the _posts directory in the PR, then you are now "published."

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment