歡迎通路我的個人部落格網站:http://www.yanmin99.com/
Hexo的Next主題增加暢言評論
評論插件選擇
- 多說評論已經确定在2017年6月1日正式關停服務,網易雲跟貼确定在2017年8月1日停服。是以推薦大家使用搜狐的暢言評論
一、暢言評論
- 注冊暢言評論
hexo的next主題常用設定 - 添加站點
hexo的next主題常用設定 - 擷取APP ID、APP KEY
hexo的next主題常用設定
二、上線暢言評論
- 打開
檔案themes/next/_config.yml
- 設定
,并且把後背景APP ID、APP KEY設定給appid和appkeyenable:true
hexo的next主題常用設定 -
啟動以後,通路如果出現以下錯誤hexo server
Unhandled rejection Error: ENOENT: no such file or directory, open '/disk2/blog/themes/next/layout/_third-party/comments/changyan.swig'
at Object.fs.openSync (fs.js::)
at Object.fs.readFileSync (fs.js::)
at Object.ret.load (/disk2/blog/node_modules/swig/lib/loaders/filesystem.js::)
at exports.Swig.compileFile (/disk2/blog/node_modules/swig/lib/swig.js::)
at Object.eval [as tpl] (eval at precompile (/disk2/blog/node_modules/swig/lib/swig.js::), <anonymous>::)
at compiled (/disk2/blog/node_modules/swig/lib/swig.js::)
at Object.eval [as tpl] (eval at precompile (/disk2/blog/node_modules/swig/lib/swig.js::), <anonymous>::)
at compiled (/disk2/blog/node_modules/swig/lib/swig.js::)
at Theme._View.View._compiled (/disk2/blog/node_modules/hexo/lib/theme/view.js::)
at Theme._View.View.View.render (/disk2/blog/node_modules/hexo/lib/theme/view.js::)
at /disk2/blog/node_modules/hexo/lib/hexo/index.js::
at tryCatcher (/disk2/blog/node_modules/bluebird/js/release/util.js::)
at /disk2/blog/node_modules/bluebird/js/release/method.js::
at RouteStream._read (/disk2/blog/node_modules/hexo/lib/hexo/router.js::)
at RouteStream.Readable.read (_stream_readable.js::)
at resume_ (_stream_readable.js::)
at _combinedTickCallback (internal/process/next_tick.js::)
at process._tickCallback (internal/process/next_tick.js::)
把changyan.swig位址拷貝以下:cp layout/_scripts/third-party/comments/changyan.swig layout/_third-party/comments/歡迎通路我的個人部落格網站:http://www.yanmin99.com/
一、加入搜尋功能
- 加入搜尋功能步驟
- 1、安裝searchdb
//安裝hexo-generator-searchdb npm install hexo-generator-searchdb --save
- 2、添加search字段,在站點配置檔案
添加search字段myBlog/_config.yml
search: path: search.xml field: post format: html limit:
- 3、編輯主題配置檔案
,啟用本地搜尋功能:myBlog/themes/next/_config.yml
# Local search local_search: enable: true
- 4、運作效果圖
hexo的next主題常用設定
- 1、安裝searchdb