Hexo博客安装

1.安装nodejs
node -v
2.安装cnpm
npm install -g cnpm –registry=https://registry.npm.taobao.org
3.安装hexo组件,启动博客
cnpm install -g hexo-cli
mkdir blog
cd blog
hexo init
hexo s //启动
hexo n “xxx” //新建博文
hexo clean //清理一下
hexo g //重新生成一下
hexo s //再启动看效果
4.配到github
注册github账号
new repository
名字必须是 github名.github.io
create
cnpm install –save hexo-deployer-git
编辑_config.yml
最后一行,deploy:
type:git
repo: https://github.com/xxx/xxx.github.io.git
branch: master
保存
hexo d
输入账号,密码
刷新,博客的内容就出来了
访问https://xxx.github.io 就能看见你的博客了
5.自定义主题
在网上找到要的hexo主题的github地址
git clone xxxxx themes/xxx
修改_config.yml
找到theme那一行
theme: xxx
hexo clean
hexo g
hexo s
主题就上去了
hexo d
等一会儿,访问github.io就行了

学贵有恒,而行胜于言
原文地址:https://www.cnblogs.com/huangbinlooksgood/p/14198205.html