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
|
self.blog.posts = sorted( |
|
self._resolve_posts(files, config), |
|
key = lambda post: post.config.date.created, |
|
reverse = True |
|
) |
- Potentially here
|
# 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
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
datemetadata, the full value is not used to control the sort order.Related links
mkdocs-material/src/plugins/blog/plugin.py
Lines 133 to 137 in 6c18591
mkdocs-material/src/plugins/blog/structure/options.py
Lines 63 to 66 in 6c18591
Reproduction
9.5.0-blog-post-sort-order-wrong.zip
Steps to reproduce
mkdocs serveMid 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