Open GIScience

Joseph Holler's Open GIScience Curriculum at Middlebury College

Research and Publish with GitHub

Sep-14 : In this lesson, we will learn fundamentals of Git version control and publish a website using Markdown, GitHub, and Jekyll.

Thanks to Yifei Luo for contributions to this lesson.

Expectations

Git

Git is a free and open source version control system for a repositories.

Git can be run from a command line shell or from a simple GUI (graphical user interface), or from a third-party program. In this course, we will primarily use GitHub’s website https://github.com and GitHub Desktop application.

GitHub

GitHub is one of many places you can host your Git repositories.

Let’s take a look at QGIS, which is hosted on GitHub.

Key Git and GitHub Actions

Example GitHub Repository

Markdown

Markdown is an easy-to-learn and very efficient language for formatting writing. It can be used for writing webpages, blogs, books, computational notebooks, and even scientific articles. Markdown is the language for writing issues, wikis, and readme pages on GitHub.

Using software like Jekyll, you can use Markdown to build websites.

Create a GitHub Page

There are two types of GitHub Pages sites. You can have a user site, where the URL will look like https://<username>.github.io; you can also have a project site, where the URL will look like https://<username>.github.io/<repository>. In this course, we will create a user site.

We will be using the Jekyll theme Minimal Mistakes, as a simple but highly customizable theme. See documentation and examples here. Feel free to research and apply other themes on your own.

Create your site

Edit your site online

You can make simple revisions to your site on GitHub.com.

Edit your site locally

I suggest making more substantial revisions to your site on a local computer.


| First Column | Second Column | Last Column |
| :----------- | :-----------: | ----------: |
| left | centered | right |
| empty middle | | empty middle |

First Column Second Column Last Column
left centered right
empty middle   empty middle

Customize your site

Let’s see how to edit the site content to make it your own.

Create a new post

---
title: "Is GIS a Science?"
categories:
  - Blog
tags:
  - science
  - GIS
---

Save images and other files in an assets folder

Jeckyll looks to an assets folder for images and other content, so lets create one now.

GitHub Logo

Keeping work in sync between GitHub.com and local repositories

To see how GitHub works when you are editing with more than one version of a repository, lets return to github.com

Cautions with Git

Further Learning

Workshops and learning resources

Readings on Git

Customizing Jekyll Sites

You can develop a more advanced Jekyll sites customized for portfolios, blogging, documentation, etc. by first forking or cloning a Jekyll template. Some of these work directly with GitHub pages (building the site remotely on GitHub’s servers), while others will require installing requisite software on your own computer to build the site locally. Nearly every aspect of a Jekyll site is customizable by downloading the relevant files from the theme’s GitHub repository into your own site’s repository and modifying them.

Here are some places to start:

Main Page