Hexo的Next主题增加畅言评论

xiaoxiao2021-02-28  86

欢迎访问我的个人博客网站:http://www.yanmin99.com/

Hexo的Next主题增加畅言评论

评论插件选择

多说评论已经确定在2017年6月1日正式关停服务,网易云跟贴确定在2017年8月1日停服。所以推荐大家使用搜狐的畅言评论

一、畅言评论

注册畅言评论 添加站点 获取APP ID、APP KEY

二、上线畅言评论

打开 themes/next/_config.yml文件设置 enable:true,并且把后后台APP ID、APP KEY设置给appid和appkey 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:651:18) at Object.fs.readFileSync (fs.js:553:33) at Object.ret.load (/disk2/blog/node_modules/swig/lib/loaders/filesystem.js:55:15) at exports.Swig.compileFile (/disk2/blog/node_modules/swig/lib/swig.js:695:31) at Object.eval [as tpl] (eval at precompile (/disk2/blog/node_modules/swig/lib/swig.js:498:13), <anonymous>:15:18) at compiled (/disk2/blog/node_modules/swig/lib/swig.js:619:18) at Object.eval [as tpl] (eval at precompile (/disk2/blog/node_modules/swig/lib/swig.js:498:13), <anonymous>:853:127) at compiled (/disk2/blog/node_modules/swig/lib/swig.js:619:18) at Theme._View.View._compiled (/disk2/blog/node_modules/hexo/lib/theme/view.js:127:30) at Theme._View.View.View.render (/disk2/blog/node_modules/hexo/lib/theme/view.js:29:15) at /disk2/blog/node_modules/hexo/lib/hexo/index.js:390:25 at tryCatcher (/disk2/blog/node_modules/bluebird/js/release/util.js:16:23) at /disk2/blog/node_modules/bluebird/js/release/method.js:15:34 at RouteStream._read (/disk2/blog/node_modules/hexo/lib/hexo/router.js:134:3) at RouteStream.Readable.read (_stream_readable.js:431:10) at resume_ (_stream_readable.js:811:12) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9)

把changyan.swig地址拷贝以下:cp layout/_scripts/third-party/comments/changyan.swig layout/_third-party/comments/

转载请注明原文地址: https://www.6miu.com/read-46069.html

最新回复(0)