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

保留使用 Yilia 主题时的多说用户评论 #1

Closed
MOxFIVE opened this Issue Oct 19, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@MOxFIVE
Owner

MOxFIVE commented Oct 19, 2015

fix: 多说在 Pages(不同页面) 中评论重复

我之前修改过多说文章 key,Yilia 用户可以用下面代码,保留原评论的同时 修复
bug。

/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)
    }) %>
  <% } %>
<% } %>

@MOxFIVE MOxFIVE closed this Oct 19, 2015

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

Merge pull request #1 from cntanglijun/ryuu
首页随机动画效果

@MOxFIVE MOxFIVE added this to the v1.0 milestone May 21, 2016

g199209 added a commit to g199209/BlogTheme that referenced this issue Nov 25, 2016

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