# Improve documentation look & feel via MkDocs Material template enhancements ## Summary This MR improves the overall **documentation experience and visual presentation** of the doc-forge docs by enhancing the MkDocs Material template configuration. The changes focus on **navigation usability, code readability, and richer Markdown rendering**, resulting in a cleaner and more professional documentation site. Docstring changes were made across the codebase for consistency, but this MR description focuses on the **template and presentation improvements**. --- ## Navigation Improvements The navigation system has been enhanced to provide a clearer structure and better discoverability. Key improvements include: * Section-aware navigation in the sidebar * Automatic expansion of module/package hierarchy * Scroll tracking within the sidebar * Clickable package index pages Material navigation features added: * `navigation.sections` * `navigation.expand` * `navigation.tracking` * `navigation.indexes` This results in a **single cohesive navigation tree** that exposes the entire documentation hierarchy from the sidebar. --- ## Code Block Improvements Code blocks previously appeared relatively plain. The template now enables richer syntax highlighting and improved readability. Enhancements include: * Syntax highlighting using `pymdownx.highlight` * Line numbers for code blocks * Anchored line numbers for deep linking * Improved fenced code block rendering Additional Material features: * `content.code.copy` — copy button for code blocks * `content.code.annotate` — support for code annotations These changes significantly improve the readability of examples and API snippets throughout the documentation. --- ## Markdown Rendering Enhancements Additional Markdown extensions were enabled to support richer documentation features: * `pymdownx.superfences` for advanced fenced blocks * `pymdownx.inlinehilite` for inline code highlighting * `pymdownx.snippets` for reusable snippets * `admonition` and `pymdownx.details` for callouts and collapsible sections * `pymdownx.tabbed` for tabbed content blocks * `pymdownx.tasklist` for checklist-style items * `tables`, `footnotes`, and advanced formatting extensions These extensions make it easier to write expressive and structured documentation. --- ## Search Experience The documentation search experience has been improved using Material search features: * `search.highlight` * `search.share` * `search.suggest` These enhancements provide: * highlighted search matches * sharable search URLs * auto-suggestions while typing --- ## mkdocstrings Improvements The mkdocstrings configuration has been expanded to produce clearer API documentation. Notable improvements include: * grouping objects by category * explicit category headings * improved symbol headings * cleaner object path display This results in more structured API documentation pages. --- ## Result Overall, these changes provide: * cleaner and more intuitive navigation * significantly improved code presentation * richer Markdown capabilities * better search usability The documentation now has a **more polished, modern appearance** and improved usability for both readers and contributors. Reviewed-on: #5 Co-authored-by: Vishesh 'ironeagle' Bangotra <aetoskia@gmail.com> Co-committed-by: Vishesh 'ironeagle' Bangotra <aetoskia@gmail.com>
120 lines
6.2 KiB
JSON
120 lines
6.2 KiB
JSON
{
|
|
"module": "docforge.renderers.base",
|
|
"content": {
|
|
"path": "docforge.renderers.base",
|
|
"docstring": "Renderer base interfaces and configuration models.\n\nThis module defines the base protocol and configuration container used by\ndoc-forge renderers. Concrete renderer implementations should implement the\n``DocRenderer`` protocol.",
|
|
"objects": {
|
|
"Path": {
|
|
"name": "Path",
|
|
"kind": "alias",
|
|
"path": "docforge.renderers.base.Path",
|
|
"signature": "<bound method Alias.signature of Alias('Path', 'pathlib.Path')>",
|
|
"docstring": null
|
|
},
|
|
"Protocol": {
|
|
"name": "Protocol",
|
|
"kind": "alias",
|
|
"path": "docforge.renderers.base.Protocol",
|
|
"signature": "<bound method Alias.signature of Alias('Protocol', 'typing.Protocol')>",
|
|
"docstring": null
|
|
},
|
|
"Project": {
|
|
"name": "Project",
|
|
"kind": "class",
|
|
"path": "docforge.renderers.base.Project",
|
|
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
|
"docstring": "Representation of a documentation project.\n\nA ``Project`` serves as the root container for all modules discovered during\nintrospection. Each module is stored by its dotted import path.\n\nAttributes:\n name: Name of the project.\n modules: Mapping of module paths to ``Module`` instances.",
|
|
"members": {
|
|
"name": {
|
|
"name": "name",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.base.Project.name",
|
|
"signature": "<bound method Alias.signature of Alias('name', 'docforge.models.project.Project.name')>",
|
|
"docstring": null
|
|
},
|
|
"modules": {
|
|
"name": "modules",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.base.Project.modules",
|
|
"signature": "<bound method Alias.signature of Alias('modules', 'docforge.models.project.Project.modules')>",
|
|
"docstring": null
|
|
},
|
|
"add_module": {
|
|
"name": "add_module",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.base.Project.add_module",
|
|
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
|
"docstring": "Register a module in the project.\n\nArgs:\n module: Module instance to add to the project."
|
|
},
|
|
"get_module": {
|
|
"name": "get_module",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.base.Project.get_module",
|
|
"signature": "<bound method Alias.signature of Alias('get_module', 'docforge.models.project.Project.get_module')>",
|
|
"docstring": "Retrieve a module by its dotted path.\n\nArgs:\n path: Fully qualified dotted module path (for example ``pkg.module``).\n\nReturns:\n The corresponding ``Module`` instance.\n\nRaises:\n KeyError: If the module does not exist in the project."
|
|
},
|
|
"get_all_modules": {
|
|
"name": "get_all_modules",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.base.Project.get_all_modules",
|
|
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
|
"docstring": "Return all modules contained in the project.\n\nReturns:\n An iterable of ``Module`` instances."
|
|
},
|
|
"get_module_list": {
|
|
"name": "get_module_list",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.base.Project.get_module_list",
|
|
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
|
"docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project."
|
|
}
|
|
}
|
|
},
|
|
"RendererConfig": {
|
|
"name": "RendererConfig",
|
|
"kind": "class",
|
|
"path": "docforge.renderers.base.RendererConfig",
|
|
"signature": "<bound method Class.signature of Class('RendererConfig', 15, 36)>",
|
|
"docstring": "Configuration container for documentation renderers.\n\nA ``RendererConfig`` instance groups together the project model and the\noutput directory used during rendering.\n\nAttributes:\n out_dir: Directory where generated documentation files will be written.\n project: Documentation project model to be rendered.",
|
|
"members": {
|
|
"out_dir": {
|
|
"name": "out_dir",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.base.RendererConfig.out_dir",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"project": {
|
|
"name": "project",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.base.RendererConfig.project",
|
|
"signature": null,
|
|
"docstring": null
|
|
}
|
|
}
|
|
},
|
|
"DocRenderer": {
|
|
"name": "DocRenderer",
|
|
"kind": "class",
|
|
"path": "docforge.renderers.base.DocRenderer",
|
|
"signature": "<bound method Class.signature of Class('DocRenderer', 39, 62)>",
|
|
"docstring": "Protocol defining the interface for documentation renderers.\n\nImplementations of this protocol are responsible for transforming a\n``Project`` model into renderer-specific documentation sources.",
|
|
"members": {
|
|
"name": {
|
|
"name": "name",
|
|
"kind": "attribute",
|
|
"path": "docforge.renderers.base.DocRenderer.name",
|
|
"signature": null,
|
|
"docstring": null
|
|
},
|
|
"generate_sources": {
|
|
"name": "generate_sources",
|
|
"kind": "function",
|
|
"path": "docforge.renderers.base.DocRenderer.generate_sources",
|
|
"signature": "<bound method Function.signature of Function('generate_sources', 49, 62)>",
|
|
"docstring": "Generate renderer-specific documentation sources.\n\nArgs:\n project: Project model containing modules and documentation objects.\n out_dir: Directory where generated documentation sources\n should be written."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |