Build Website with Github Pages

#github #blog

Build Website with Github Pages

1. Github Pages Documents:

GitHub Pages Basics

How GitHub Pages sites use custom domains ,try to understand how the page is redirected.

2. Create the MAIN site repository:

  1. create repository: username.github.io
  2. create index page index.html
  3. create file CNAME:
     example.com
    
  4. push under branch: master
  5. get ip address:
     ping username.github.io
    
  6. configure DNS A record for host “@” and “www”:
     主机名	类型	对应值			TTL
     @		A		103.245.222.133	900	-	
     www		A		103.245.222.133	900	-
    
  7. then you can visit: http://example.com

@see adding a cname file to your repository

3. Create the BLOG site repository:

  1. create repository: blog.example.com

  2. create index page index.html

  3. create file CNAME:example.com

  4. push under branch: gh-pages

  5. then you can visit: http://example.com/blog

4. github markdown syntax

Mastering Markdown

Markdown Cheatsheet

15 Nov 2015,