Skip to content

Commit

Permalink
Add dividers
Browse files Browse the repository at this point in the history
  • Loading branch information
McDic committed May 28, 2024
1 parent 573dea8 commit 76f913c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_plugin_blog/mkdocs_material_mcdic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 76f913c

Please sign in to comment.