Open haowanxing opened 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自动初始化中除了这个配置,还带了个脚本😂
@madordie 想法很好,完美解决!
初始化评论针对URL创建新issue,如果url中带有Get参数或锚点,会被判定成一个新的页面,形成一个新的评论区域。 期望解决这个问题,不然大家看到的同样的页面,评论内容却是分开的。