Classes
SectionIndex
Index pages by section (directory).
Provides O(1) lookup of all pages in a section:
site.index…
SectionIndex
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
QueryIndexMethods 1
extract_keys
Extract section name from page.
extract_keys
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__
__init__
def __init__(self, cache_path: Path)
Parameters 1
cache_path |
Path |