x2rs / x2rs.github.io

x2rs's personal blog.
Creative Commons Attribution Share Alike 4.0 International
0 stars 1 forks source link

给每个页面都添加giscus评论区 #6

Closed x2rs closed 4 months ago

x2rs commented 4 months ago

我需要研究一下怎么自动给每个页面添加giscus评论区,以及应该用什么方式,是链接还是文件名还是标题。

giscus链接

x2rs commented 4 months ago

主页使用的这个<script>标签

<script src="https://giscus.app/client.js"
        data-repo="x2rs/x2rs.github.io"
        data-repo-id="R_kgDOMISvfQ"
        data-category="Announcements"
        data-category-id="DIC_kwDOMISvfc4CgFts"
        data-mapping="pathname"
        data-strict="0"
        data-reactions-enabled="1"
        data-emit-metadata="0"
        data-input-position="top"
        data-theme="preferred_color_scheme"
        data-lang="zh-CN"
        crossorigin="anonymous"
        async>
</script>
x2rs commented 4 months ago

mkdocs-material添加giscus教程

x2rs commented 4 months ago

image