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:
627627 enable : false
628628 # 指定的插件,需要同时设置对应插件的必要参数
629629 # 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
631631 type : disqus
632632
633633
@@ -756,6 +756,15 @@ twikoo:
756756 region : ap-shanghai
757757 path : window.location.pathname
758758
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+
759768# ---------------------------
760769# 归档页
761770# Archive Page
@@ -909,7 +918,7 @@ links:
909918 enable : false
910919 # 指定的插件,需要同时设置对应插件的必要参数
911920 # 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
913922 type : disqus
914923
915924
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 178178 window . REMARK42 . changeTheme ( schema ) ;
179179 }
180180
181+ // 设置 cusdis 评论主题
182+ if ( window . CUSDIS ) {
183+ window . CUSDIS . setTheme ( schema ) ;
184+ }
185+
181186 // 设置 utterances 评论主题
182187 var utterances = document . querySelector ( 'iframe' ) ;
183188 if ( utterances ) {
You can’t perform that action at this time.
0 commit comments