Hexo-Butterfly-Theme博客搭建
前言
Hexo-Butterfly-Theme,一款比较新而且界面美观的主题。
Hexo:
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Butterfly-Theme:
https://github.com/jerryc127/hexo-theme-butterfly
How to use Hexo
准备工作
在安装前,须检查电脑中是否已安装下列应用程序:
如果已经安装上述必备程序,接下来只需要使用 npm 即可完成 Hexo 的安装。
1 | npm install -g hexo-cli |
如果尚未安装所需要的程序,请根据以下安装指示完成安装。
安装 Git
- Windows:下载并安装 git.
- Mac:使用 Homebrew, MacPorts :
brew install git
;或下载 安装程序 安装。 - Linux (Ubuntu, Debian):
sudo apt-get install git-core
- Linux (Fedora, Red Hat, CentOS):
sudo yum install git-core
安装 Node.js
安装 Node.js 的最佳方式是使用 nvm。
cURL:
1 | curl https://raw.github.com/creationix/nvm/master/install.sh | sh |
Wget:
1 | wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh |
安装完成后,重启终端并执行下列命令即可安装 Node.js。
1 | nvm install stable |
安装 Hexo
必备的应用程序安装完成后,即可使用 npm 安装 Hexo。
1 | npm install -g hexo-cli |
用法
1 | hexo init #初始化一个项目 |
新建一个文件夹后初始化一个项目,之后的按照 Butterly-theme 主题下的官方文档一步步来就可以了。
创建题目
1 | hexo new "文章标题" --path learning/coding/文件名 --category 分类名 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Levi's Blog!
评论