QnA,一個 Hexo FAQ 主題

以前在 Gitbook 上建立了一個 FAQ 網站,可是 Gitbook 使用起來偏麻煩,並且主題很差看。預期建立一個 Gitbook 主題,不如建立一個 Hexo 主題,而後將網站部署到 Github 上。因而我便動手製做了這個主題。git

這個主題的最初目的是爲了服務這個網站 Swift Newbie: 給 Swift 新手的知識庫,對 Swift 學習感興趣的同窗能夠點開看看,有意貢獻的同窗能夠聯繫我 hi@chengkang.megithub

項目主頁:《Theme QnA for Hexo》npm

爲 Hexo 設計的『知識庫』類主題。bash

文檔

展現:

如何安裝

安裝

$ git clone https://github.com/cheng-kang/hexo-theme-qna.git themes/QnA

啓用

修改根目錄中 _config.ymlthemeQnA。url

更新

cd themes/QnA
git pull

高級功能

發佈到 Github

安裝 Hexo 插件 hexo-deployer-gitspa

$ npm install hexo-deployer-git --save

編輯你 Hexo 博客根目錄中的 _config.yml 文件。插件

deploy:
  type: git
  repo: <repository url> # https://github.com/cheng-kang/hexo-theme-qna.git
  branch: [branch] # master

啓用中文站內搜索

QnA 默認只支持英文站內搜索。

安裝 Hexo 插件 hexo-generator-search

$ npm install hexo-generator-search --save

添加新頁面

  1. 添加一個新頁面,例如:about 頁面。改變頁面內容請修改根目錄下 source/about/index.md 文件。

    $ hexo new page about
  2. 編輯 theme/QnA 中的 _config.yml

    menu:
      Home: /
      Archive: /archives
      # Add new page config here
      # Page Dispay Name: /pagename
      # e.g.
      About: /about
相關文章
相關標籤/搜索