From 07bd5644013f9cce2d4dff03092f35112cd77b70 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Mon, 7 Feb 2022 18:01:41 +0800 Subject: [PATCH] Replace hexo-related-popular-posts with hexo-related-posts (#447) --- _config.yml | 8 +------- layout/_partials/post/post-related.njk | 12 ++++++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/_config.yml b/_config.yml index 20ec4f4..d796b34 100644 --- a/_config.yml +++ b/_config.yml @@ -273,17 +273,11 @@ follow_me: #RSS: /atom.xml || fa fa-rss # Related popular posts -# Dependencies: https://github.com/tea3/hexo-related-popular-posts +# Dependencies: https://github.com/sergeyzwezdin/hexo-related-posts related_posts: enable: false title: # Custom header, leave empty to use the default one display_in_home: false - params: - maxCount: 5 - #PPMixingRate: 0.0 - #isDate: false - #isImage: false - #isExcerpt: false # Post edit # Easily browse and edit blog source code online. diff --git a/layout/_partials/post/post-related.njk b/layout/_partials/post/post-related.njk index f5b25bc..7d5cd8a 100644 --- a/layout/_partials/post/post-related.njk +++ b/layout/_partials/post/post-related.njk @@ -1,13 +1,13 @@ -{%- set popular_posts = popular_posts_json(theme.related_posts.params, page) %} -{%- if popular_posts.json and popular_posts.json.length > 0 %} +{%- if page.related_posts and page.related_posts.length > 0 %}