Make your own blog with Jekyll

jekyll  github-pages 

Overview

Jekyll convert Markdown, Liquid, also HTML&CSS into static blogs that easily hosting with GitHub Pages.

See Simple site and its github simple_site.

This blog is also generated by Jekyll.

Blog structure

The following is simple blog structure

_layouts
_posts
Gemfile
_config.yml
about.md
index.md

The _layouts directory consists of HTML layout pages. Layouts are templates that wrap around other pages. Layout files use Liquid templating language

All blog pages live in a directory called _posts. They use the post layout. All files is formated by Markdown.

Gemfile is bundle config file and _config.yml is jekyll config file.

index.md is blog index page, about.md is about-me page.

See The whole Jekyll Directory Structure.

Test Blog locally

  1. Intall ruby, or use RubyInstaller in Windows.
  2. Install the github-pages gem (including jekyll)
     gem install github-pages
    
  3. Clone existed Blog or create a new blog
     jekyll new path
    
  4. Build and run
     jekyll build
     jekyll serve
    
     # or just type
     jekyll b
     jekyll s
    
  5. visit http://localhost:4000
  6. Use bundle to manage jekyll
     gem install bundler
    

    build and run (in Github Pages directory), Gemfile is required.

     bundle install
     bundle exec jekyll serve
    

refs