Classes
DateRangeIndex
Index pages by publication date (year and month buckets).
Creates index entries for both year and …
DateRangeIndex
Index pages by publication date (year and month buckets).
Creates index entries for both year and year-month: '2024' → All pages from 2024 '2024-01' → All pages from January 2024 '2024-02' → All pages from February 2024
Provides O(1) lookup: site.indexes.date_range.get('2024') # All 2024 posts site.indexes.date_range.get('2024-01') # All January 2024 posts
Use cases:
- Archive pages by year/month
- "Recent posts" filtering
- Date-based navigation
- Publication timelines
Inherits from
QueryIndexMethods 1
extract_keys
Extract year and year-month from page date.
extract_keys
def extract_keys(self, page: Page) -> list[tuple[str, dict[str, Any]]]
Extract year and year-month from page date.
Parameters 1
page |
Page |
Returns
list[tuple[str, dict[str, Any]]]
Internal Methods 1
__init__
__init__
def __init__(self, cache_path: Path)
Parameters 1
cache_path |
Path |