File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,7 @@ post:
627
627
enable : false
628
628
# 指定的插件,需要同时设置对应插件的必要参数
629
629
# The specified plugin needs to set the necessary parameters at the same time
630
- # Options: utterances | disqus | gitalk | valine | waline | changyan | livere | remark42 | twikoo
630
+ # Options: utterances | disqus | gitalk | valine | waline | changyan | livere | remark42 | twikoo | cusdis
631
631
type : disqus
632
632
633
633
@@ -756,6 +756,15 @@ twikoo:
756
756
region : ap-shanghai
757
757
path : window.location.pathname
758
758
759
+ # Cusdis
760
+ # 基于第三方服务或自托管服务
761
+ # Based on third-party or self-hosted service
762
+ # See https://cusdis.com
763
+ cusdis :
764
+ host :
765
+ appID :
766
+ lang : zh-cn
767
+
759
768
# ---------------------------
760
769
# 归档页
761
770
# Archive Page
@@ -909,7 +918,7 @@ links:
909
918
enable : false
910
919
# 指定的插件,需要同时设置对应插件的必要参数
911
920
# The specified plugin needs to set the necessary parameters at the same time
912
- # Options: utterances | disqus | gitalk | valine | waline | changyan | livere | remark42 | twikoo
921
+ # Options: utterances | disqus | gitalk | valine | waline | changyan | livere | remark42 | twikoo | cusdis
913
922
type : disqus
914
923
915
924
Original file line number Diff line number Diff line change
1
+ <% if (theme .cusdis .host && theme .cusdis .appID ) { % >
2
+ < div class = " cusdis" style= " width:100%" >
3
+ < div id= " cusdis_thread"
4
+ data- host= " <%= theme.cusdis.host %>"
5
+ data- app- id= " <%= theme.cusdis.appID %>"
6
+ data- page- id= " <%= md5(page.path) %>"
7
+ data- page- url= " <%= page.path %>"
8
+ data- page- title= " <%= page.title %>"
9
+ data- theme= " <%= theme.dark_mode.default %>"
10
+ >
11
+ < / div>
12
+ < / div>
13
+ < script type= " text/javascript" >
14
+ Fluid .utils .loadComments (' #cusdis_thread' , function () {
15
+ Fluid .utils .createScript (' <%= url_join(theme.cusdis.host, ' js/ cusdis .es .js ' ) %>' );
16
+ Fluid .utils .createScript (' <%= url_join(theme.cusdis.host,
17
+ `/js/widget/lang/${ String(theme.cusdis.lang || ' zh- cn' ).toLowerCase() }.js`) %>' );
18
+ var schema = document .documentElement .getAttribute (' data-user-color-scheme' );
19
+ if (schema) {
20
+ document .querySelector (' #cusdis_thread' ).dataset .theme = schema
21
+ }
22
+ });
23
+ < / script>
24
+ < noscript> Please enable JavaScript to view the comments< / noscript>
25
+ < % } %>
Original file line number Diff line number Diff line change 178
178
window . REMARK42 . changeTheme ( schema ) ;
179
179
}
180
180
181
+ // 设置 cusdis 评论主题
182
+ if ( window . CUSDIS ) {
183
+ window . CUSDIS . setTheme ( schema ) ;
184
+ }
185
+
181
186
// 设置 utterances 评论主题
182
187
var utterances = document . querySelector ( 'iframe' ) ;
183
188
if ( utterances ) {
You can’t perform that action at this time.
0 commit comments