From 76f913c9235e2d8c7ae51568fd822d79d5d4a98b Mon Sep 17 00:00:00 2001 From: Minsung Kim Date: Tue, 28 May 2024 20:59:18 +0900 Subject: [PATCH] Add dividers --- custom_plugin_blog/mkdocs_material_mcdic/core.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/custom_plugin_blog/mkdocs_material_mcdic/core.py b/custom_plugin_blog/mkdocs_material_mcdic/core.py index aeb55a53a..0e3ba89af 100644 --- a/custom_plugin_blog/mkdocs_material_mcdic/core.py +++ b/custom_plugin_blog/mkdocs_material_mcdic/core.py @@ -545,10 +545,10 @@ def _modify_markdown_on_series_index_page( ), key=(lambda post: self.pop_category_id(post.title)), ) - joinlist = [markdown, constants.SERIES_INDEX_PREFIX % (series, series)] + joinlist = [markdown, constants.SERIES_INDEX_PREFIX % (series, series), "---"] for post in posts: - joinlist.append("---") joinlist.extend(self._get_page_excerpt(post, config)) + joinlist.append("---") return "\n\n".join(joinlist) def _get_sorted_pages_by_date(self, files: Files) -> list[Page]: @@ -594,6 +594,7 @@ def _modify_markdown_on_recent_posts_page( ] for page in self._get_sorted_pages_by_date(files)[: self.config.sorted.recent]: joinlist.extend(self._get_page_excerpt(page, config)) + joinlist.append("---") return "\n\n".join(joinlist) def _modify_markdown_on_most_viewed_posts_page( @@ -613,6 +614,7 @@ def _modify_markdown_on_most_viewed_posts_page( reverse=True, )[: self.config.sorted.most_viewed]: joinlist.extend(self._get_page_excerpt(page, config)) + joinlist.append("---") return "\n\n".join(joinlist) def _modify_markdown_on_archives_page( @@ -643,6 +645,7 @@ def _modify_markdown_on_archives_page( ), ): joinlist.extend(self._get_page_excerpt(page, config)) + joinlist.append("---") return "\n\n".join(joinlist) @event_priority(constants.LATE_EVENT_PRIORITY)