updated template for mkdocs and rendered MCP docs and site
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"module": "docforge.renderers.mkdocs_renderer",
|
||||
"content": {
|
||||
"path": "docforge.renderers.mkdocs_renderer",
|
||||
"docstring": "MkDocsRenderer\n\nGenerates Markdown source files compatible with MkDocs Material\nand mkdocstrings, ensuring:\n\n- Root index.md always exists\n- Parent package indexes are created automatically\n- Child modules are linked in parent index files\n- README.md can be generated from the root package docstring",
|
||||
"docstring": "MkDocs renderer implementation.\n\nThis module defines the ``MkDocsRenderer`` class, which generates Markdown\ndocumentation sources compatible with MkDocs Material and the mkdocstrings\nplugin.\n\nThe renderer ensures a consistent documentation structure by:\n\n- Creating a root ``index.md`` if one does not exist\n- Generating package index pages automatically\n- Linking child modules within parent package pages\n- Optionally generating ``README.md`` from the root package docstring",
|
||||
"objects": {
|
||||
"Path": {
|
||||
"name": "Path",
|
||||
@@ -16,7 +16,7 @@
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project",
|
||||
"signature": "<bound method Alias.signature of Alias('Project', 'docforge.models.Project')>",
|
||||
"docstring": "Represents a documentation project, serving as a container for modules.\n\nAttributes:\n name: Name of the project.\n modules: Dictionary mapping module paths to Module instances.",
|
||||
"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",
|
||||
@@ -37,28 +37,28 @@
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Project.add_module",
|
||||
"signature": "<bound method Alias.signature of Alias('add_module', 'docforge.models.project.Project.add_module')>",
|
||||
"docstring": "Add a module to the project.\n\nArgs:\n module: The module to add."
|
||||
"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.mkdocs_renderer.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: The dotted path of the module (e.g., 'pkg.mod').\n\nReturns:\n The requested 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.mkdocs_renderer.Project.get_all_modules",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_modules', 'docforge.models.project.Project.get_all_modules')>",
|
||||
"docstring": "Get all modules in the project.\n\nReturns:\n An iterable of Module objects."
|
||||
"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.mkdocs_renderer.Project.get_module_list",
|
||||
"signature": "<bound method Alias.signature of Alias('get_module_list', 'docforge.models.project.Project.get_module_list')>",
|
||||
"docstring": "Get the list of all module dotted paths.\n\nReturns:\n A list of module paths."
|
||||
"docstring": "Return the list of module import paths.\n\nReturns:\n A list containing the dotted paths of all modules in the project."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -67,7 +67,7 @@
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module",
|
||||
"signature": "<bound method Alias.signature of Alias('Module', 'docforge.models.Module')>",
|
||||
"docstring": "Represents a documented Python module or package.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level docstring content.\n members: Dictionary mapping object names to their DocObject representations.",
|
||||
"docstring": "Representation of a documented Python module or package.\n\nA ``Module`` stores metadata about the module itself and maintains a\ncollection of top-level documentation objects discovered during\nintrospection.\n\nAttributes:\n path: Dotted import path of the module.\n docstring: Module-level documentation string, if present.\n members: Mapping of object names to their corresponding\n ``DocObject`` representations.",
|
||||
"members": {
|
||||
"path": {
|
||||
"name": "path",
|
||||
@@ -95,21 +95,21 @@
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.add_object",
|
||||
"signature": "<bound method Alias.signature of Alias('add_object', 'docforge.models.module.Module.add_object')>",
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj: The object to add."
|
||||
"docstring": "Add a documented object to the module.\n\nArgs:\n obj: Documentation object to register as a top-level\n member of the module."
|
||||
},
|
||||
"get_object": {
|
||||
"name": "get_object",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.get_object",
|
||||
"signature": "<bound method Alias.signature of Alias('get_object', 'docforge.models.module.Module.get_object')>",
|
||||
"docstring": "Retrieve a member object by name.\n\nArgs:\n name: The name of the object.\n\nReturns:\n The requested DocObject."
|
||||
"docstring": "Retrieve a documented object by name.\n\nArgs:\n name: Name of the object to retrieve.\n\nReturns:\n The corresponding ``DocObject`` instance.\n\nRaises:\n KeyError: If no object with the given name exists."
|
||||
},
|
||||
"get_all_objects": {
|
||||
"name": "get_all_objects",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.Module.get_all_objects",
|
||||
"signature": "<bound method Alias.signature of Alias('get_all_objects', 'docforge.models.module.Module.get_all_objects')>",
|
||||
"docstring": "Get all top-level objects in the module.\n\nReturns:\n An iterable of DocObject instances."
|
||||
"docstring": "Return all top-level documentation objects in the module.\n\nReturns:\n An iterable of ``DocObject`` instances representing the\n module's public members."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -117,8 +117,8 @@
|
||||
"name": "MkDocsRenderer",
|
||||
"kind": "class",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer",
|
||||
"signature": "<bound method Class.signature of Class('MkDocsRenderer', 17, 242)>",
|
||||
"docstring": "Renderer that generates Markdown source files formatted for the MkDocs\n'mkdocstrings' plugin.",
|
||||
"signature": "<bound method Class.signature of Class('MkDocsRenderer', 20, 272)>",
|
||||
"docstring": "Renderer that produces Markdown documentation for MkDocs.\n\nGenerated pages use mkdocstrings directives to reference Python modules,\nallowing MkDocs to render API documentation dynamically.",
|
||||
"members": {
|
||||
"name": {
|
||||
"name": "name",
|
||||
@@ -131,15 +131,15 @@
|
||||
"name": "generate_sources",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_sources",
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 28, 66)>",
|
||||
"docstring": "Produce a set of Markdown files in the output directory based on the\nprovided Project models.\n\nArgs:\n project:\n The project model to render.\n\n out_dir:\n Target directory for generated Markdown.\n\n module_is_source:\n If True, treat the module as the root folder."
|
||||
"signature": "<bound method Function.signature of Function('generate_sources', 34, 71)>",
|
||||
"docstring": "Generate Markdown documentation files for a project.\n\nThis method renders a documentation structure from the provided\nproject model and writes the resulting Markdown files to the\nspecified output directory.\n\nArgs:\n project: Project model containing modules to document.\n out_dir: Directory where generated Markdown files will be written.\n module_is_source: If True, treat the specified module as the\n documentation root rather than nesting it inside a folder."
|
||||
},
|
||||
"generate_readme": {
|
||||
"name": "generate_readme",
|
||||
"kind": "function",
|
||||
"path": "docforge.renderers.mkdocs_renderer.MkDocsRenderer.generate_readme",
|
||||
"signature": "<bound method Function.signature of Function('generate_readme', 68, 122)>",
|
||||
"docstring": "Generate README.md from the root package docstring.\n\nBehavior:\n\n- If module_is_source is True:\n README.md is generated at project root (docs_dir.parent)\n\n- If module_is_source is False:\n TODO: generate README.md inside respective module folders"
|
||||
"signature": "<bound method Function.signature of Function('generate_readme', 73, 128)>",
|
||||
"docstring": "Generate a ``README.md`` file from the root module docstring.\n\nBehavior:\n\n- If ``module_is_source`` is True, ``README.md`` is written to the\n project root directory.\n- If False, README generation is currently not implemented.\n\nArgs:\n project: Project model containing documentation metadata.\n docs_dir: Directory containing generated documentation sources.\n module_is_source: Whether the module is treated as the project\n source root."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user