2026-06-03 09:35:10 +00:00
|
|
|
{% if page.meta.comments %}
|
|
|
|
|
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
|
2026-06-03 10:40:04 +00:00
|
|
|
<div id="cusdis_thread"></div>
|
|
|
|
|
<script>
|
|
|
|
|
(function() {
|
|
|
|
|
var host = "{{ config.extra.cusdis.host }}";
|
|
|
|
|
var appId = "{{ config.extra.cusdis.app_id }}";
|
|
|
|
|
var pageId = "{{ page.canonical_url }}";
|
|
|
|
|
var pageUrl = "{{ page.canonical_url }}";
|
|
|
|
|
var pageTitle = "{{ page.title }}";
|
|
|
|
|
var theme = "auto";
|
|
|
|
|
|
|
|
|
|
var iframe = document.createElement("iframe");
|
|
|
|
|
iframe.src = host + "/iframe/thread"
|
|
|
|
|
+ "?app_id=" + encodeURIComponent(appId)
|
|
|
|
|
+ "&page_id=" + encodeURIComponent(pageId)
|
|
|
|
|
+ "&page_url=" + encodeURIComponent(pageUrl)
|
|
|
|
|
+ "&page_title=" + encodeURIComponent(pageTitle)
|
|
|
|
|
+ "&theme=" + theme;
|
|
|
|
|
iframe.style.cssText = "width:100%;border:none;min-height:300px";
|
|
|
|
|
iframe.title = "Comments";
|
|
|
|
|
|
|
|
|
|
var container = document.getElementById("cusdis_thread");
|
|
|
|
|
if (container) container.appendChild(iframe);
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
2026-06-03 09:35:10 +00:00
|
|
|
<noscript>Please enable JavaScript to view the comments.</noscript>
|
|
|
|
|
{% endif %}
|