Module

cache.indexes.section_index

Section Index - Index pages by section.

Classes

SectionIndex
Index pages by section (directory). Provides O(1) lookup of all pages in a section: site.index…
2

Index pages by section (directory).

Provides O(1) lookup of all pages in a section: site.indexes.section.get('blog') # All blog posts site.indexes.section.get('docs') # All docs pages

Example frontmatter:

# Section is automatically detected from directory structure
# content/blog/post.md → section = 'blog'
# content/docs/guide.md → section = 'docs'
Inherits from QueryIndex

Methods 1

extract_keys
Extract section name from page.
1 list[tuple[str, dic…
def extract_keys(self, page: Page) -> list[tuple[str, dict[str, Any]]]

Extract section name from page.

Parameters 1
page Page
Returns

list[tuple[str, dict[str, Any]]]

Internal Methods 1
__init__
1 None
def __init__(self, cache_path: Path)
Parameters 1
cache_path Path