A Late Simple Guide for hexo with github
Orion Electric Age

Windows Operations

Install nodejs

NodeJS

Add nodejs path to enviroment path

1
2
C:\Program Files\nodejs
C:\Users\henry\AppData\Roaming\npm

Install git

Git-SCM

Install hexo with gitbash

Hexo
Hexo docs

Generate ssh key with gitbash

1
ssh-keygen -t rsa

OpenSSH key management

Copy the public rsa

1
cat ~/.ssh/id_rsa.pub

Github Operations

Sign up a github account

Github Sign up

Setup github account ssh-key

Create github repository

Github new repository
Note: repository name shoud be with .github.io suffix

Create hexo project

Init hexo project

1
hexo init orionhubble

Install dependecy

1
npm install hexo-deployer-git --save

Setup hexo project config

The hexo config file is _config.yml

  • set your own url(site address) and root as bellow
    1
    2
    url: https://orionhubble.github.io/
    root: /
  • set post_asset_folder as bellow
    1
    post_asset_folder: true
  • set deploy with git
    1
    2
    3
    4
    deploy:
    type: git
    repo: your own github address
    branch: master

Deploy your project

1
hexo cl; hexo ge; hexo de

Debug in local

1
hexo cl; hexo server

Last but not Must

Change hexo theme

Hexo Themes

1
2
npm install hexo-generator-searchdb --save
npm install hexo-theme-keep --save

Set categories page

  • config theme menu with categories

  • generate categories page

    1
    hexo new page categories

Add plungins

Hexo Plugins

Set your own domain name

  • Get ip address

    1
    ping orionhubble.github.io

    Ping orionhubble.github.io 185.199.111.153

  • Set domain name resolution ip
    Config this in your domain provider.

  • Add CNAME file
    You shoud add CNAME file in directory: hexo-theme-xxx/source

References

Hexo Hello World