Created by Drew Gerber / @DigitalZebra
How to create a demo or website for your open source project hosted on GitHub?
How to create a simple blog for either yourself, an organization, or project?
GitHub's answer for projects and organizations needing websites
“Websites for you and your projects”
“Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.”
The Git ecosystem is what we'll be using to “publish” changes to our websites and blog.
~ $ jekyll new site-name
~ $ cd site-name
~ $ jekyll serve
Complete command list:
~ $ git clone <repo_name>
~ $ cd <repo_name>
~ $ git checkout -b gh-pages
~ $ git push origin gh-pages
~ $ echo hello world > index.html
~ $ git add .
~ $ git commit -m "hello world!"
~ $ git push origin gh-pages
GitHub also provides a wizard which does many of these manual steps for you.
CNAME file tells GitHub which host routes to this project (you also need to configure a CNAME entry
in your DNS record)
Jekyll consists of the following technologies:
Once Jekyll is installed, simply run the following to create a new site and serve it:
~ $ jekyll new site-name
~ $ cd site-name
~ $ jekyll serve
_drafts # Where draft posts go
_includes # Include files (eg. footer, header) go here. Think partial files.
_layouts # Layout files go here. These can include content or partials.
_posts # Your blog posts will go in here as Markdown or HTML files
_site # This is the folder where Jekyll outputs all of the HTML files
_sass # Sass files for site
_config.yml # YAML based configuration file for Jekyll
Creating a new post is as simple as adding a file to the _posts directory:
_posts
- 2014-09-04-new-post.markdown
Sample Post:
---
layout: post
title: "This is my new post!"
date: 2014-09-04 20:25:30
categories: helloworld
---
Hello world!