on_config() — fastapi Function Reference
Architecture documentation for the on_config() function in mkdocs_hooks.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 8a014fc2_a028_b55f_fe7f_bc250428ead2["on_config()"] 566dbae4_46de_4e4a_0ed4_0c59e40fbcf8["mkdocs_hooks.py"] 8a014fc2_a028_b55f_fe7f_bc250428ead2 -->|defined in| 566dbae4_46de_4e4a_0ed4_0c59e40fbcf8 5c70712c_f93a_f5ce_48af_6ccb9ee98a1b["get_mkdocs_material_langs()"] 8a014fc2_a028_b55f_fe7f_bc250428ead2 -->|calls| 5c70712c_f93a_f5ce_48af_6ccb9ee98a1b style 8a014fc2_a028_b55f_fe7f_bc250428ead2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/mkdocs_hooks.py lines 52–60
def on_config(config: MkDocsConfig, **kwargs: Any) -> MkDocsConfig:
available_langs = get_mkdocs_material_langs()
dir_path = Path(config.docs_dir)
lang = dir_path.parent.name
if lang in available_langs:
config.theme["language"] = lang
if not (config.site_url or "").endswith(f"{lang}/") and lang != "en":
config.site_url = f"{config.site_url}{lang}/"
return config
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does on_config() do?
on_config() is a function in the fastapi codebase, defined in scripts/mkdocs_hooks.py.
Where is on_config() defined?
on_config() is defined in scripts/mkdocs_hooks.py at line 52.
What does on_config() call?
on_config() calls 1 function(s): get_mkdocs_material_langs.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free