Skip to content

Commit da72417

Browse files
committed
[test] netease comments
1 parent 5855739 commit da72417

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ kramdown:
5050
# Disqus settings
5151
disqus_username: hux
5252

53+
# Netease setttings
54+
netease_comment: true
55+
5356
# Duoshuo settings
5457
duoshuo_username: huxblog
5558
# Share component is depend on Comment so we can NOT use share only.

_layouts/post.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ <h2 class="subheading">{{ page.subtitle }}</h2>
130130
<!-- disqus 评论框 end -->
131131
{% endif %}
132132

133+
{% if site.netease_comment %}
134+
<!-- 网易云跟帖 评论框 start -->
135+
<div id="cloud-tie-wrapper" class="cloud-tie-wrapper"></div>
136+
<!-- 网易云跟帖 评论框 end -->
137+
{% endif %}
133138
</div>
134139

135140
<!-- Side Catalog Container -->
@@ -208,6 +213,20 @@ <h5>FRIENDS</h5>
208213
<!-- 多说公共JS代码 end -->
209214
{% endif %}
210215

216+
{% if site.netease_comment %}
217+
<!-- 网易云跟帖JS代码 start -->
218+
<script>
219+
var cloudTieConfig = {
220+
url: document.location.href,
221+
sourceId: "",
222+
productKey: "de25fc98a6fe48b3bc8a7ae765da99a0",
223+
target: "cloud-tie-wrapper"
224+
};
225+
</script>
226+
<script src="https://img1.cache.netease.com/f2e/tie/yun/sdk/loader.js"></script>
227+
<!-- 网易云跟帖JS代码 end -->
228+
{% endif %}
229+
211230

212231
{% if site.disqus_username %}
213232
<!-- disqus 公共JS代码 start (一个网页只需插入一次) -->

0 commit comments

Comments
 (0)