博客评论功能测试

测试giscus评论功能

  1. 2022-10-31 测试可用
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<script src="https://giscus.app/client.js"
                    data-repo="lengyefenghan/blog"
                    data-repo-id="R_kgDOHJIjrA"
                    data-category="Comments"
                    data-category-id="DIC_kwDOHJIjrM4CSMzr"
                    data-mapping="pathname"
                    data-strict="0"
                    data-reactions-enabled="1"
                    data-emit-metadata="1"
                    data-input-position="top"
                    data-theme="light"
                    data-lang="zh-CN"
                    crossorigin="anonymous"
                    async>
                </script>
  1. 测试嵌入模板
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
        file:hemes/meme/layouts/partials/components/comments.html
        {{ if .Site.Params.enableGiscus }}
            <div id="giscus">
                <script src="https://giscus.app/client.js"
                    data-repo="lengyefenghan/blog"
                    data-repo-id="R_kgDOHJIjrA"
                    data-category="Comments"
                    data-category-id="DIC_kwDOHJIjrM4CSMzr"
                    data-mapping="pathname"
                    data-strict="0"
                    data-reactions-enabled="1"
                    data-emit-metadata="1"
                    data-input-position="top"
                    data-theme="light"
                    data-lang="zh-CN"
                    crossorigin="anonymous"
                    async>
                </script>
            </div>
        {{ end }}
updatedupdated2023-01-262023-01-26