本篇作简要总结,不作过多展开,详情请看前两篇或官方文档
创建名为
your_name.github.io的 GitHub 仓库-
简单初始化
$ mkdir your_name.github.io $ cd your_name.github.io $ hexo init $ npm install hexo-deployer-git --save若需要输入 LaTex 数学公式,请键入下述命令,或者使用 Jacman 主题:
$ npm install hexo-math --save -
下载需要的主题
$ git clone https://github.com/wzpan/hexo-theme-wixo.git themes/wixo $ npm install hexo-tag-bootstrap --save若要更新主题,请键入
$ cd themes/wixo $ git pull -
撰写文章
- 新建草稿:
hexo new draft article01 - 发布草稿:
hexo publish article01 - 新建页面:
hexo new page article02 - 新建普通文章:
hexo new article03 - 删除文章:直接删除文章对应的
.md文件即可
- 新建草稿:
如果要修改文章 URL 形式为
类别/文件名,请修改根目录下的_config.yml文件中的permalink字段为:permalink: :category/:title/。这要求在每一篇文章的开头都加入categories: <value>字段,把<value>替换成文章对应的分类。没有该字段的文章,会被分到uncategorized分类下。