Switching to GitHub pages

Abstract

Because of an high load on my website, Wordpress hosted by OVH seems no more suitable for my needs. Jekyll hosted by GitHub is the right solution to learn something new. This post will include some notes on Jekyll and Markdown syntax.

Jekyll installation

Install Ruby version 2, then use gem to install Jekyll:

# apt-get install ruby ruby-dev
# gem install jekyll
# gem install jekyll-sitemap

Start Jekyll:

# jekyll s --port 8080 --incremental -s /home/jekyll/ -d /var/www/html/

Header and filename

The header of a page could be like the following:

---
layout: post
published: true
title: "Switching to GitHub pages"
abstract: ! "Because of an high load on my website, Wordpress hosted by OVH seems no more suitable for my needs.
 Jekyll hosted by GitHub is the right solution to learn something new."
categories:
- Generic
authors:
- andrea
tags:
- HowTo
- Jekyll
- Markdown
---

The filename should be 2015-06-05-switching-to-github-pages.md.

Titles

Example

Title 1

Title 2

Title 3

Title 4

Title 5
Title 6

Code

# Title 1

## Title 2

### Title 3

#### Title 4

##### Title 5

###### Title 6

Paragraph

The following examples are used inside a paragraph.

Bold text

Example

This is a bold text.

Code

This is a ***bold*** text.

Inline code

Example

This is an inline code.

Code

This is an `inline code`.

Example

This is an internal link.

Code

This is an [internal link](/2015/06/switching-to-github-pages/ "link title").

Example

This is an external link.

Code

This is an [external link](http://www.google.com/ "Link title").

Image

Example

This is an image:

Alt Text

Code

![Alt Text](/assets/images/logo_ad.png "Image title")

Example

This is a linked image:

Alt Text

Code

[![Alt Text](/assets/images/logo_ad.png "Image title")](/2015/06/switching-to-github-pages/ "Link title")

Ordered list

Example

  1. Element 1
  2. Element 2
    1. Nested element 2.1
    2. Nested element 2.2
  3. Element 3

Code

1. Element 1
2. Element 2
    1. Nested element 2.1
    2. Nested element 2.2
3. Element 3

Unordered list

Example

  • Element 1
  • Element 2
    • Nested element 2.1
    • Nested element 2.2
  • Element 3

Code

- Element 1
- Element 2
    - Nested element 2.1
    - Nested element 2.2
- Element 3

Preformatted text (code)

Example

This is a generic
multiline
code

Code

~~~
This is a generic
multiline
code
~~~

Table

Example

Header 1 Header 2
Data 1.1 Data 1.2
Data 2.1 Data 2.2

Code

| Header 1 | Header 2 |
|:--|:--|
| Data 1.1 | Data 1.2 |
| Data 2.1 | Data 2.2 |
{: rules="groups"}

References

Posted on 05 Jun 2015 by Andrea.
  • Gmail icon
  • Twitter icon
  • Facebook icon
  • LinkedIN icon
  • Google+ icon