Skip to content
laobubu edited this page Mar 8, 2016 · 1 revision

Quick Guide

Install on GitHub Pages

First of all, you need to follow the instruction to create your GitHub Pages

Then execute the following commands one-by-one on your Terminal. It will download EasyBook and fill your new website.

git clone https://github.com/laobubu/jekyll-theme-EasyBook.git easybook
cd easybook
git remote add blog git@github.com:foo/bar #1
git push -f -u blog gh-pages #2
  1. replace git@github.com:foo/bar with your git remote URL
  2. if your repo name is something like xxxxx.github.io, execute this instead:
git checkout -b master
git push -f -u blog master

Configure

Open easybook directory and modify _config.yaml file.

Notice the url and baseurl field. If your website is http://laobubu.github.io/, use

url: "http://laobubu.github.io"
baseurl: ""

If your website is http://laobubu.github.io/MarkdownIME/, use

url: "http://laobubu.github.io"
baseurl: "/MarkdownIME"

Also works with your own custom domain.

Writing your Post

Filename and directory

Your posts shall be in _posts directory. The file-name follows YYYY-MM-DD-TITLE.TYPE pattern. For example:

  • 2011-12-31-new-years-eve-is-awesome.md ( md means Markdown )
  • 2012-01-17-hello-world.md

YAML Front Matter

To make Jekyll render your posts correctly, please write YAML Front Matter before your content. Here is the simplest example:

---
layout: post
title: Blogging Like a Hacker
---

Hello there. Today I'm gonna talk about how to use Jekyll and EasyBook, a great Jekyll theme/template...

You can also set other variables like this

---
layout: post
title: Blogging Like a Hacker
categories: 
 - Blog
 - Technology
permalink: /posts/1
nocomments: true  # Disable the comment box. This is EasyBook feature
---

Hello there. Today I'm gonna talk about how to use Jekyll and EasyBook, a great Jekyll theme/template...

Further more

Read https://jekyllrb.com/docs/posts/

Publish

Use git commit and git push as usual. That's all.

Upgrade your EasyBook

Execute this command to download and apply the new patches:

git pull origin gh-pages

Donate

Buy me a coffee if you find EasyBook useful for you 😃

Visit http://laobubu.net/donate.html