Skip to content

Commit

Permalink
feat: 调整了对于官方渲染器置顶处理的兼容性
Browse files Browse the repository at this point in the history
  • Loading branch information
Candinya committed Feb 14, 2021
1 parent 83a7b2f commit f9decb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@

为了获得更佳的使用体验,建议安装的插件有:

- hexo-generator-index-pin-top
- hexo-generator-feed

hexo的官方渲染器现在也已经支持文章置顶啦,配置`Front-Matter`段中的`sticky`参数即可实现置顶降序排序,可以参见生成器的[官方文档](https://github.com/hexojs/hexo-generator-index#usage)

## 💬 支持的评论系统

- [Disqus](https://disqus.com)
Expand Down
4 changes: 2 additions & 2 deletions layout/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<% } else { %>
<article class="kratos-hentry clearfix">
<div class="kratos-entry-border-new clearfix">
<% if (post.top) { %><img class="stickyimg" src="/images/sticky.webp"><% } %>
<% if (post.sticky || post.top) { %><img class="stickyimg" src="/images/sticky.webp"><% } %>
<div class="kratos-entry-thumb-new">
<a href="<%- url_for(post.path) %>">
<% if (post.pic) { %>
Expand All @@ -100,7 +100,7 @@
class: 'label',
style: 'none'
}) %>
<h2 class="kratos-entry-title-new"><a href="<%- url_for(post.path) %>"><%- post.title %><% if (post.subtitle) { %><sub><%- post.subtitle %></sub><% } %></a><% if (post.top) { %><strong>——置顶</strong></h2><% } %>
<h2 class="kratos-entry-title-new"><a href="<%- url_for(post.path) %>"><%- post.title %><% if (post.subtitle) { %><sub><%- post.subtitle %></sub><% } %></a><% if (post.sticky || post.top) { %><strong>——置顶</strong></h2><% } %>
</header>
<div class="kratos-entry-content-new">
<p>
Expand Down

0 comments on commit f9decb1

Please sign in to comment.