Build BLOG with Hexo

Install Hexo

SEE Hexo: https://hexo.io/zh-cn/index.html
tips: npm install -g npm Error: https://github.com/npm/npm/issues/10010

NexT theme & config

SEE NexT: http://theme-next.iissnan.com/getting-started.html

1.visit algolia: https://www.algolia.com
2.regist && visit dashboard
3.indices -> create new index
4.API Keys -> ALL API KEYS -> Edit
upload successful
upload successful
5.update _config.yml add

1
2
3
4
5
algolia:
applicationID: 'applicationID'
apiKey: 'apiKey'
indexName: 'indexName'
chunkSize: 5000

6.A separate API Key must be provided as an environment variable named HEXO_ALGOLIA_INDEXING_KEY

1
2
$ export HEXO_ALGOLIA_INDEXING_KEY=Your Api Key
$ ./node_modules/.bin/hexo algolia

7.SEE: https://www.npmjs.com/package/hexo-algolia

Comment

SEE Hypercomments: https://www.hypercomments.com/

Deploy to github.io

1.update _config.yml

1
2
3
4
5
6
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repository: https://github.com/YourName/YourName.github.io.git
branch: master

2.if you use hexo-admin,you can add a deploy script hexo-deploy.sh

1
2
3
#!/usr/bin/env sh
hexo g
hexo deploy

3.update _config.yml

1
2
3
4
5
6
# hexo-admin authentification
admin:
username: YourName
password_hash: YourPwd
secret: YourSecret
deployCommand: './hexo-deploy.sh'

Reference

https://github.com/jaredly/hexo-admin/issues/70
https://reuixiy.github.io/technology/computer/computer-aided-art/2017/06/09/hexo-next-optimization.html
https://github.com/npm/npm/issues/10010
https://ask.helplib.com/linux/post_60421