New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多说在 page 中评论重复 #21

Closed
MOxFIVE opened this Issue Oct 14, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@MOxFIVE
Owner

MOxFIVE commented Oct 14, 2015

post 文章多说评论互不干扰,但在 page 页面中评论都一样。

@MOxFIVE MOxFIVE added the bug label Oct 14, 2015

@MOxFIVE

This comment has been minimized.

Show comment
Hide comment
@MOxFIVE

MOxFIVE Oct 14, 2015

Owner

article.ejs

<% if (!index && theme.duoshuo && post.comments){ %>
<%- partial('post/duoshuo', {
    key: post.slug, 
    title: post.title,
    url: config.url+url_for(post.path)
  }) %>
<% } %>

key: post.slug 改为 key: post.path,这样会按页面地址生成唯一的 key, 避免重复。

Owner

MOxFIVE commented Oct 14, 2015

article.ejs

<% if (!index && theme.duoshuo && post.comments){ %>
<%- partial('post/duoshuo', {
    key: post.slug, 
    title: post.title,
    url: config.url+url_for(post.path)
  }) %>
<% } %>

key: post.slug 改为 key: post.path,这样会按页面地址生成唯一的 key, 避免重复。

@MOxFIVE MOxFIVE closed this Oct 14, 2015

MOxFIVE added a commit to MOxFIVE/hexo-theme-yelee that referenced this issue Oct 16, 2015

MOxFIVE added a commit that referenced this issue Jan 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment