Skip to content
Permalink
Browse files

多说要关闭了,修改为使用搜狐畅言评论插件

  • Loading branch information...
Clarence-pan committed Mar 22, 2017
1 parent 96b9a6a commit a6a85f89e17900d023c8c67020465830532f75bb
@@ -99,9 +99,15 @@ less:
- source/css/style.less

# 是否开启多说评论,填写你在多说创建的站点二级域名
duoshuo: clarence-pan
duoshuo: false
# 是否开启多说评论计数(该服务不稳定)
duoshuo_count: true
duoshuo_count: false

# 搜狐畅言的appid配置: (如果为false,则不显示搜狐畅言)
changyan: cysUkeX5G
# 搜狐畅言的conf配置:
changyan_conf: prod_60afcdd5c73414aea0e0dce2601a3563

# 使用 disqus 时关闭多说评论
disqus_shortname: false

@@ -0,0 +1,10 @@
<% if (theme.changyan){ %>
<div id="SOHUCS" sid="<%- sid %>" ></div>
<script type="text/javascript">
(function(){
var appid = '<%- theme.changyan %>';
var conf = '<%- theme.changyan_conf %>';
var width = window.innerWidth || document.documentElement.clientWidth;
if (width<960){window.document.write('<script id="changyan_mobile_js" charset="utf-8" type="text/javascript" src="https://changyan.sohu.com/upload/mobile/wap-js/changyan_mobile.js?client_id=' + appid + '&conf=' + conf + '"><\/script>'); } else { var loadJs=function(d,a){var c=document.getElementsByTagName("head")[0]||document.head||document.documentElement;var b=document.createElement("script");b.setAttribute("type","text/javascript");b.setAttribute("charset","UTF-8");b.setAttribute("src",d);if(typeof a==="function"){if(window.attachEvent){b.onreadystatechange=function(){var e=b.readyState;if(e==="loaded"||e==="complete"){b.onreadystatechange=null;a()}}}else{b.onload=a}}c.appendChild(b)};loadJs("https://changyan.sohu.com/upload/changyan.js",function(){window.changyan.api.config({appid:appid,conf:conf})}); } })();
</script>
<% } %>
@@ -4,6 +4,8 @@
title: post.title,
url: url
}) %>
<%- partial('../plugins/changyan', {sid: post.slug}) %>
<%- partial('../plugins/disqus') %>
<%} %>

5 comments on commit a6a85f8

@Wensibob

This comment has been minimized.

Copy link

replied Mar 24, 2017

可以支持除了畅言之外的评论系统吗?

@Clarence-pan

This comment has been minimized.

Copy link
Owner Author

replied Mar 25, 2017

其他评论系统没有试过,你可以试试。应该都差不多,无外乎就这三个文件修改下。

@yunxu-it

This comment has been minimized.

Copy link

replied Apr 8, 2017

不错,效仿着安上了网易云跟帖

@jasonzhang1986

This comment has been minimized.

Copy link

replied Apr 27, 2017

网易云跟帖搞了半天,没搞定,可以共享下方法吗? @yunxu-it

@jasonzhang1986

This comment has been minimized.

Copy link

replied Apr 27, 2017

@yunxu-it 看到你的博客记载了,已经成功接入,多谢!!

Please sign in to comment.
You can’t perform that action at this time.