Fork me on GitHub

Github-Blog

Use Github to create your own blog

Register for Github.io

  1. register for Github account
  2. create a new repository:
    username.github.io

Install Hexo

Env: Ubuntu 16.04

  1. Dependencies:
    • Git
    • NodeJs
    • Hexo
  2. Methods:

    • Git: sudo apt-get install git
    • NodeJs: NodeJs+NPM

      • if you wan to upgrade your nodejs, you could install a module named “n”
        1
        2
        sudo npm install -g -n
        sudo n stable
    • Hexo: sudo npm install hexo-cli -g

Write &Publish

  1. initialization
    hexo init username.github.io
  2. configuration

    • install the theme
      cd username.github.io
      use default and popular theme: next
      git clone https://github.com/iissnan/hexo-theme-next themes/next
      for more themes, you can check the links: HEXO THEMEs
    • basic configuration
      edit username.github.io/_config.yml
      Hexo Basic Confs: More Confs
      Notice:
      1
      2
      3
      4
      5
      6
      7
      title: [blog name]
      author: [your name]
      language: [zh-Hans、en]
      theme: __next__
      deploy:
      type: git
      repo: git@github.com:username/username.github.io
  3. wirte
    hexo new [layout] "essay name"
    hexo post scaffolds

  4. test
    hexo s
  5. deploy
    • install hexo-deployer-git hexo-deployer-git tool:
      npm install hexo-deployer-git --save
  6. publish
    • hexo clean
    • hexo g
    • exo d
  7. browse

Hexo: https://hexo.io/
NexT: http://theme-next.iissnan.com/
Individual Settings: 1, 2

-------------The end Thanks-------------

Title:Github-Blog

Author:Xingbo WANG

Datetime:2018-02-05 - 22:02

Latestupdate:2018-02-07 - 20:02

Originallink:http://yoursite.com/2018/02/05/Github-Blog/

licence: The copyright of this article belongs to the author. Please quote this as reference upon reproduction of this article.

You donation will be huge motivation for me.