本篇作簡(jiǎn)要總結(jié)捺疼,不作過多展開汰聋,詳情請(qǐng)看前兩篇或官方文檔
創(chuàng)建名為
your_name.github.io
的 GitHub 倉庫-
簡(jiǎn)單初始化
$ mkdir your_name.github.io $ cd your_name.github.io $ hexo init $ npm install hexo-deployer-git --save
若需要輸入 LaTex 數(shù)學(xué)公式堆巧,請(qǐng)鍵入下述命令,或者使用 Jacman 主題:
$ npm install hexo-math --save
-
下載需要的主題
$ git clone https://github.com/wzpan/hexo-theme-wixo.git themes/wixo $ npm install hexo-tag-bootstrap --save
若要更新主題咧党,請(qǐng)鍵入
$ cd themes/wixo $ git pull
-
撰寫文章
- 新建草稿:
hexo new draft article01
- 發(fā)布草稿:
hexo publish article01
- 新建頁面:
hexo new page article02
- 新建普通文章:
hexo new article03
- 刪除文章:直接刪除文章對(duì)應(yīng)的
.md
文件即可
- 新建草稿:
如果要修改文章 URL 形式為
類別/文件名
溜徙,請(qǐng)修改根目錄下的_config.yml
文件中的permalink
字段為:permalink: :category/:title/
。這要求在每一篇文章的開頭都加入categories: <value>
字段糠排,把<value>
替換成文章對(duì)應(yīng)的分類舵稠。沒有該字段的文章,會(huì)被分到uncategorized
分類下。