A Late Simple Guide for hexo with github
Windows Operations
Install nodejs
Add nodejs path to enviroment path
1 | C:\Program Files\nodejs |
Install git
Install hexo with gitbash
Generate ssh key with gitbash
1 | ssh-keygen -t rsa |
Copy the public rsa
1 | cat ~/.ssh/id_rsa.pub |
Github Operations
Sign up a github account
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
2url: https://orionhubble.github.io/
root: / - set post_asset_folder as bellow
1
post_asset_folder: true
- set deploy with git
1
2
3
4deploy:
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
1 | npm install hexo-generator-searchdb --save |
Set categories page
config theme menu with categories
generate categories page
1
hexo new page categories
Add plungins
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