Hexo安装

环境:
OS: CentOS6.5
arch: x86_64

Hexo官方网址:https://hexo.io

需要安装:

  1. Node.js
  2. Git(系统自带)

一、Node.js的安装

Node.js官网:https://nodejs.org
1. curl –silent –location https://rpm.nodesource.com/setup_6.x | bash -
2. yum -y install nodejs
如果没有安装gcc-c++ make等编译工具需要安装此编译工具
3. yum injstall gcc-c++ make
以上操作在root用户下进行

二、Git的安装

这个系统已经自带

三、Hexo的安装

  1. npm install -g hexo-cli

四、Hexo使用

新建文件夹hexo
进入该文件夹

  1. mkdir hexo
  2. cd hexo
  3. hexo init
  4. hexo generate
  5. hexo server
  6. hexo deploy

五、_config.yml配置

theme: 使用themes对应的主题名字
deploy:
type: git
repo: 【gitbug的url】
branch: master
message: 【自定义】
为了能够部署到github上,还需要安装一个插件
npm install hexo-deployer-git –save

六、主题

yilia: https://github.com/litten/hexo-theme-yilia
even:https://github.com/ahonn/hexo-theme-even

你可能感兴趣的:(hexo)