Valine icon indicating copy to clipboard operation
Valine copied to clipboard

标题下​ Valine字段 显示不是中文“留言” 阅读次数: 3 Valine: 1

Open tanghk opened this issue 3 years ago • 2 comments

标题下​ Valine字段 显示不是中文“留言” 阅读次数: 3 Valine: 1

https://tanghk.github.io/2021/04/16/MacBook%20Pro%20Early%202015%20%E6%9B%B4%E6%8D%A2%E5%9B%BA%E6%80%81%E7%A1%AC%E7%9B%98/#valine-comments

tanghk avatar May 02 '21 05:05 tanghk

hexo.extend.filter.register('theme_inject', injects => {
  let theme = hexo.theme.config;
  if (!theme.valine.enable || !theme.valine.appid || !theme.valine.appkey) return;

  injects.postMeta.raw('valine', `
  {% if post.comments and (is_post() or theme.valine.comment_count) %}
  <span class="post-meta-item">
    ${iconText('comment-o', '评论数')}
    <a title="valine" href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
    </a>
  </span>
  {% endif %}
  `, {}, {}, theme.valine.post_meta_order);

});

找到themes/hexo-theme-next/scripts/filters/comment/valine.js修改 ${iconText('comment-o', '评论数')}

XuShall avatar Jul 02 '21 17:07 XuShall

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 07:04 stale[bot]