{% if page.meta.comments %}
<h2id="__comments">{{ lang.t("meta.comments") }}</h2><!-- Insert generated snippet here --><scriptsrc="https://giscus.app/client.js"data-repo="你的仓库名称(如Wcowin/hexo-site-comments)"data-repo-id=" "data-category=" "data-category-id=" "data-mapping="pathname"data-strict="0"data-reactions-enabled="1"data-emit-metadata="0"data-input-position="bottom"data-theme="preferred_color_scheme"data-lang="zh-CN"crossorigin="anonymous"async></script><!-- Synchronize Giscus theme with palette --><script>vargiscus=document.querySelector("script[src*=giscus]")// Set palette on initial loadvarpalette=__md_get("__palette")if(palette&&typeofpalette.color==="object"){vartheme=palette.color.scheme==="slate"?"transparent_dark":"light"// Instruct Giscus to set themegiscus.setAttribute("data-theme",theme)}// Register event handlers after documented loadeddocument.addEventListener("DOMContentLoaded",function(){varref=document.querySelector("[data-md-component=palette]")ref.addEventListener("change",function(){varpalette=__md_get("__palette")if(palette&&typeofpalette.color==="object"){vartheme=palette.color.scheme==="slate"?"transparent_dark":"light"// Instruct Giscus to change themevarframe=document.querySelector(".giscus-frame")frame.contentWindow.postMessage({giscus:{setConfig:{theme}}},"https://giscus.app")}})})</script>{% endif %}