imsun / gitment

A comment system based on GitHub Issues.
https://imsun.github.io/gitment/
MIT License
4.06k stars 349 forks source link

同一个页面,带锚点#more会初始化一条新的issue #168

Open haowanxing opened 6 years ago

haowanxing commented 6 years ago

初始化评论针对URL创建新issue,如果url中带有Get参数或锚点,会被判定成一个新的页面,形成一个新的评论区域。 期望解决这个问题,不然大家看到的同样的页面,评论内容却是分开的。

madordie commented 6 years ago

可以修改一下这里:

        var gitment = new {{CommentsClass}}({
-           id: document.location.href,
+           id: md5(window.location.pathname),
            owner: '{{ theme.gitment.github_user }}',
            repo: '{{ theme.gitment.github_repo }}',

将其使用window.location.pathname处理。 这个详细的 在Gitment/Gitalk自动初始化中除了这个配置,还带了个脚本😂

haowanxing commented 6 years ago

@madordie 想法很好,完美解决!

sariabiha commented 2 years ago

https://advance-esthetic.us/rf-facial-machines