-
-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Feature Specification: Date Prefixes for Blog Post Publish Dates
Current Functionality: The application supports ordering documentation pages within the sidebar using numerical prefixes.
New Functionality: Support setting the blog post publish dates using date-based prefixes for blog posts.
Requirements:
-
Date Format: Support date prefixes in the format
YYYY-MM-DD
(e.g., 2024-11-05) as defined in the ISO 8601 standard. Optionally supportYYYY-MM-DD-HH-MM
for more granular ordering. -
Prefix Stripping: The date prefix must be removed from the route key, mirroring the behavior of numerical prefixes for documentation pages.
-
Front Matter Integration:
- The extracted date from the prefix should be used to populate the
date
field in the blog post's front matter. - If the
date
is explicitly defined in the front matter, it should take precedence over the date extracted from the prefix. This behavior should be consistent with the existing documentation prefix feature.
- The extracted date from the prefix should be used to populate the
-
Markdown Post Specificity: This feature should only apply to
MarkdownPost
types. -
Zero-Padding:
While zero-padding (e.g., usingZero padding should be required05
instead of5
for the day) is highly encouraged in the documentation, the system should be robust enough to handle date prefixes that omit leading zeros.
Examples:
Basic Date Prefixes:
2024-11-05-my-first-post.md
2024-11-06-another-post.md
2024-11-10-yet-another-post.md
Detailed Date Prefixes:
2024-11-05-10-30-my-first-post.md
2024-11-06-14-45-another-post.md
2024-11-10-09-00-yet-another-post.md