-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Context
Thanks for the really awesome tool!
I recently noticed that when publishing multiple posts on a single date, there's no real way to "manually" sort them in to a desired order.
Bug description
When supplying a date metadata, the full value is not used to control the sort order.
---
date: 2023-06-06T00:00:01
---
vs
---
date: 2023-06-06T00:00:02
---Related links
- Reporting a bug
- https://squidfunk.github.io/mkdocs-material/plugins/blog/#meta.date
- I suspect something near here
mkdocs-material/src/plugins/blog/plugin.py
Lines 133 to 137 in 6c18591
self.blog.posts = sorted( self._resolve_posts(files, config), key = lambda post: post.config.date.created, reverse = True ) - Potentially here
mkdocs-material/src/plugins/blog/structure/options.py
Lines 63 to 66 in 6c18591
# Convert all date values to datetime for key, value in config[key_name].items(): if isinstance(value, date): config[key_name][key] = datetime.combine(value, time())
Reproduction
9.5.0-blog-post-sort-order-wrong.zip
Steps to reproduce
- Load the attached repo
- Run
mkdocs serve - Observe the incorrect sort order of
Mid 1, Mid 2, Mid 3- where it should be reversed.
This is seen in both the main text and the TOC right sidebar.
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction.
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open