Joseph Holler's Open Source GIScience Resources at Middlebury College
Sep-16 : In this lesson, we will publish a website with GitHub, Jekyll, and Markdown and learn purpose and concepts for Git version control.
Lost documents? Nightmares from merging sloppy revisions from your team? Group member accidentally ruins your project the night before a presentation? Documents proliferating with names like thesis_final_final2_final3_soseriouslythefinaldraft.docx? Can’t reproduce your own research when your thesis committee asks a question about what you did? “GO ON, GIT!”, ridiculously outdated document file systems and recycle bin fail-safe let-downs, and go back to the floppy disks and CD-RW drives where you came from. Try not to hit SHIFT + DEL on your way outta here!
![]() |
|---|
| Don’t be this student failing to print FINAL V2 overnight during finals week |
.md files into websites.username.github.io where username is your GitHub user name.
GIS4DEV.github.io is the repository serving this website for the GIS4DEV organization..github.io repository. This usually happens very quickly, but sometimes takes up to ten minutes. GitHub Pages makes it very easy to publish websites, but it does take some patience to see your commits reflected in the website. ‘F5’ is for refresh!+ add menu at the top-right, and New Repositoryusername.github.io where username is your GitHub user nameBSD and MIT licenses are normal open source licenses, while the GNU license is a copyleft license restricting future use to equally open source and free work.Create repositorySettings menu and Pages and then Choose a theme_config.yml file in your repository with a theme variable indicating which theme you just selected. This can be changed later without re-coding all of your content!Add file menu to create new file named index.md (md is for markdown)
index page if you don’t specify a file in the address---
layout: default
title: Main Page
---
# This is my page header
Leave blank lines between paragraphs, tables, lists, etc.
Start sentences on new lines.
They will render seamlessly into paragraphs.
Add two blank spaces at the end of a sentence
if you want a new line.
- bullet list first item
- bullet list second item
1. numbered list first item
1. numbered list second item
The course website is found [here](https://gis4dev.github.io).
Here is some *italicized* text and some **bold text**.
It will be much easier to edit page content on your local computer using a text editor. To set this up, we’ll use GitHub Desktop to clone your repository to the local computer and Atom to edit content. Please install both programs.
GIS4DEV/literature repositoryadd project folder, choosing your cloned Repositoryindex.mdPackages –> Markdown Preview or Ctrl + Shift + M to see your markdown stylized.Packages –> Markdown Preview menu, I suggest:
first column | second column | third column
:----------- | :-----------: | -----------:
left justified | centered | right justified
new row | | left blank cell
staged the changes in a list. Clicking on individual files shows a diff of the changes with deletions in red and additions in green.commit the changes to the local repository.push the changes.To see how GitHub works when you are editing with more than one version of a repository, lets return to github.com
Fetch originHistory of your Repositoryrevert changesfetch changes from GitHub.com before you start working locally, especially if you use multiple computers.reminder always remember to commit and push changes when you are finished working locally
show suggestions on keystroke. You can still get suggestions with keyboard shortcut Ctrl+Space_config.yml in atomtheme: minimal
title: website title
description: short website description
_layoutspage.html to serve as a page _layoutpage.html to add a Title and Main Page link to all of your pages:---
layout: default
---
<h1>{{ page.title }}</h1>
{{content}}
<p align=center><a href="https://username.github.io">Main Page</a></p>
--- lines is YAML Front Matter, code inside < > tags is HTML, and code inside {{ }} is liquid.open-giscience.md in the root folder of your site
---
layout: page
title: Open GIScience
---
I intend to write a blog post here before next class!
index.md file.(Open GIScience)[open-giscience]assets folder for images and other content, so lets create one now.assets folder inside your repository’s root directoryassets folder, e.g. one of the github logos
Virtually every aspect of a Jekyll template can be customized. If you want to do so, copy individual files that you want to customize from the original Jekyll repository, so that your local copy will override the template. Alternatively, clone the entire repository to your own local version and customize from there.
You can develop a more advanced 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. Here are some places to start:
GitHub cheat sheet
StageCommitRevert changesPushPullBranchCloneFork.gitignore>100mbpulled the most recent commitsstaged changes are committed together, they are bundled for purposes of pushing and reverting. In other words, to undo one of the changes, you must undo them all.commit frequently.push your latest commits.