npm 镜像npm 淘宝镜像源
123456# 使用淘宝源npm install -g cnpm --registry=http://registry.npmmirror.com# 检查是否安装成功cnpm -v# 可以切换回官方源npm config set registry https://registry.npmjs.org/
安装 Butterfly参考:Butterfly
123456# 方法一npm install hexo-theme-butterfly#通过 npm 安装并不会在 themes 里生成主题文件夹,而是在 node_modules 里生成# 方法二git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly#在你的 Hexo 根目录里
快速开始
前言使用 Hexo + butterfly + GitHub 搭建个人博客所有必备的应用程序安装完成后,即可使用 npm 安装 Hexo。
软件安装安装 Node.js进入Node.js官网下载:https://nodejs.org/en/download/或查看本机是否安装 Node.js
1$ node -v
安装 Git进入Git官网下载:https://git-scm.com/downloads或查看本机是否安装 Node.js
1$ git --version
安装 Hexo选择一个磁盘,新建一个文件夹,重命名文件夹,博客相关文件将储存在此文件夹下,在该文件夹下右键鼠标,点击 Git Bash Here,输入以下 npm 命令即可安装,
1$ npm install hexo-cli -g
初始化博客1$ hexo inti
本地启动12$ hexo generate$ hexo server # 访问 http://localhost:4000
新建博客文章1$ hexo new "title"