Hello Hero 哈哈哈

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.

Quick Start

  • 安装
1
2
$ npm install hexo-cli g
$ npm install hexo -g
1
hexo init blog

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server 或者 s

More info: Server

Generate static files

1
$ hexo generate 或者 g

More info: Generating

Deploy to remote sites

1
$ hexo deploy 或者 d

More info: Deployment

坑爹的地方真多

  • 命令部署github,会报缺少hexo-deployer-git组件错误。

安装组件

1
$ npm install hexo-deployer-git --save
  • 安装deployer组件以后,hexo g 竟然会无法生成 index,导致404.
1
$ npm ls --depth 0

查看所有组件的安装情况,发现N多组件都是error!!!!。把所有error的组件通通安装一遍!通通!通通!问题解决。

  • 换肤
    themes 网址下找到指定皮肤

themes目录下克隆模版文件

1
$ git clone https://github.com/shenliyang/hexo-theme-snippet.git

配置文件_config.yml修改模版名

1
2
3
4
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: TKL

重新构建文件一切ok