Closed MOxFIVE closed 8 years ago
fix: 多说在 Pages(不同页面) 中评论重复
我之前修改过多说文章 key,Yilia 用户可以用下面代码,保留原评论的同时 修复 bug。
把 /yelee/layout/_partial/article.ejs 下的这段代码删掉:
/yelee/layout/_partial/article.ejs
- <% if (!index && theme.duoshuo && post.comments){ %> - <%- partial('post/duoshuo', { - key: post.path, - title: post.title, - url: config.url+url_for(post.path) - }) %> - <% } %>
用下面这段代码替换:
<% if (!index && theme.duoshuo && post.comments){ %> <% if (is_post()){ %> <%- partial('post/duoshuo', { key: post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } else {%> <%- partial('post/duoshuo', { key: post.path, title: post.title, url: config.url+url_for(post.path) }) %> <% } %> <% } %>
fix: 多说在 Pages(不同页面) 中评论重复
我之前修改过多说文章 key,Yilia 用户可以用下面代码,保留原评论的同时 修复 bug。
把
/yelee/layout/_partial/article.ejs
下的这段代码删掉:用下面这段代码替换: