Links
AI / Agents
gdtest-toc-title
Test site toc-title config.
Tests site.toc-title: ‘Contents’ (vs. default ‘On this page’). The TOC heading should show ‘Contents’.
Source files
gdtest_toc_title/
__init__.py
"""Package testing site toc-title config."""
__all__ = ["index", "lookup"]
def index(items: list) -> dict:
"""Build an index from a list of items.
Parameters
----------
items : list
The items to index.
Returns
-------
dict
A dictionary mapping each item to its position.
Examples
--------
>>> index(["a", "b", "c"])
{'a': 0, 'b': 1, 'c': 2}
"""
return {item: i for i, item in enumerate(items)}
def lookup(key: str) -> str:
"""Look up a value by key.
Parameters
----------
key : str
The key to look up.
Returns
-------
str
The value associated with the key.
Examples
--------
>>> lookup("name")
'name'
"""
return keyREADME.md
# gdtest-toc-title Test site toc-title config.
great-docs.yml
site: toc-title: Contents