Hexo GithubPage Blog Note

用Hexo和GithubPage搭个静态Blog, 特记录下一些重点,以便后期查看.
blog主更新地址在, 会不定期将blog更新在此.

SSH-key

rm ~/.ssh/*
ssh-keygen -t rsa -C "youemail@name.com"

add ~/.ssh/id_rsa.pub ssh key to your github setting ssh-key

Install Hexo

npm(cnpm) install hexo-cli -g

Initial hexo folder

hexo init yourfolder
cd yourfolder && npm(cnpm) install

Test connection to github

ssh git@github.com

Add your account info

git config --global user.name "youname"
git config --global user.email "youemail"

Configuring hexo deployment file _config.yml

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: ssh address for your git repo
  branch: master

Push post

hexo clean
hexo g
hexo d

Error about git

npm(cnpm) install hexo-deployer-git --save

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容