1、安装node和npm
npm config set registry https://registry.npm.taobao.org
2、sudo npm install hexo -g 安装
3、检查是否安装成功
创建博客
4、madir blog && cd blog
5、hexo init初始化,将本地文件夹初始为具体博客环境的文件夹
6、hexo server 启动本地hexo服务
7、接下来注册一个githup账号,进入子自己的账号
8、添加仓库


下面我们一起操作一下:
下载node.js,进入node.js中文网,直接下载

打开终端
1、验证node是否安装成功 node -v (会显示出node版本号)

2、切换到淘宝镜像npm config set registry https://registry.npm.taobao.org
验证是否切换成功 npm config get registry

3、安装hexo
sudo npm install hexo -g
4、检查是否安装成功 hexo -h

5、创建本地文件并进入mkdir blog&&cd blog
6、初始化 hexo init
7、hexo server
8、修改_config.yml

修改

npm install hexo-deployer-git --save 安装插件,使markdown能够发布到博客园
hexo new 文章名
hexo g 把md文件编译成html css js
hexo d 把静态文件发布到githup

打开这里的链接地址
网友评论