Classes
_CollectionHolder
1
▼
Mutable wrapper so startup hook can replace the collection.
Route closures capture this holder — w…
_CollectionHolder
1
▼
Mutable wrapper so startup hook can replace the collection.
Route closures capture this holder — when autodoc merges pages, the updated collection is visible to subsequent requests.
Methods
Internal Methods 1 ▼
__init__
1
▼
__init__
1
▼
def __init__(self, collection: DocsCollection) -> None
Parameters
| Name | Type | Description |
|---|---|---|
collection |
— |
DocsPlugin
2
▼
Serve markdown documentation as first-class Chirp pages.
DocsPlugin
2
▼
Serve markdown documentation as first-class Chirp pages.
Methods
register
2
▼
Wire routes, templates, filters, and globals into the app.
register
2
▼
def register(self, app: App, prefix: str) -> None
Parameters
| Name | Type | Description |
|---|---|---|
app |
— |
|
prefix |
— |
Internal Methods 1 ▼
__init__
6
▼
__init__
6
▼
def __init__(self, content_dir: str | Path, *, title: str = 'Documentation', include_drafts: bool = False, autodoc: bool = True, tools: bool = True, suspense: bool = False) -> None
Parameters
| Name | Type | Description |
|---|---|---|
content_dir |
— |
|
title |
— |
Default:'Documentation'
|
include_drafts |
— |
Default:False
|
autodoc |
— |
Default:True
|
tools |
— |
Default:True
|
suspense |
— |
Default:False
|
Functions
_block_body_text
2
str
▼
Strip tags + collapse whitespace for plain-text block-match scoring.
_block_body_text
2
str
▼
def _block_body_text(html: object, max_len: int = _BLOCK_BODY_MAX) -> str
Parameters
| Name | Type | Description |
|---|---|---|
html |
object |
|
max_len |
int |
Default:_BLOCK_BODY_MAX
|
Returns
str