updated template for mkdocs and rendered MCP docs and site

This commit is contained in:
2026-03-07 16:07:18 +05:30
parent 17d39a3e88
commit 7f5dd7e5be
31 changed files with 1308 additions and 936 deletions

View File

@@ -11,6 +11,8 @@ generating renderer sources, building documentation sites, exporting
machine-readable documentation bundles, and starting development or MCP
servers.
---
Typical usage
-------------
@@ -22,6 +24,8 @@ Programmatic invocation is also possible:
from docforge.cli import main
main()
---
"""
from .main import main

View File

@@ -4,6 +4,8 @@ Loader layer for doc-forge.
The ``docforge.loaders`` package is responsible for discovering Python modules
and extracting documentation data using static analysis.
---
Overview
--------
@@ -18,6 +20,8 @@ Core capabilities include:
hierarchies using the ``griffe`` library without executing the code.
- **Public API filtering** Exclude private members (names prefixed with
``_``) to produce clean public documentation structures.
---
"""
from .griffe_loader import GriffeLoader, discover_module_paths

View File

@@ -4,6 +4,8 @@ Model layer for doc-forge.
The ``docforge.models`` package defines the core data structures used to
represent Python source code as a structured documentation model.
---
Overview
--------
@@ -23,6 +25,8 @@ Key components:
These models are intentionally **renderer-agnostic**, allowing the same
documentation structure to be transformed into multiple output formats
(e.g., MkDocs, MCP, or other renderers).
---
"""
from .project import Project

View File

@@ -5,6 +5,8 @@ The ``docforge.nav`` package manages the relationship between the logical
documentation structure defined by the user and the physical documentation
files generated on disk.
---
Workflow
--------
@@ -17,6 +19,8 @@ Workflow
This layer separates documentation organization from the underlying source
code layout, enabling flexible grouping, ordering, and navigation structures
independent of module hierarchy.
---
"""
from .spec import NavSpec, load_nav_spec

View File

@@ -4,6 +4,8 @@ Renderers layer for doc-forge.
The ``docforge.renderers`` package transforms the internal documentation
models into files formatted for specific documentation systems.
---
Overview
--------
@@ -18,11 +20,15 @@ Current implementations:
- **MCPRenderer** Emits structured JSON resources designed for consumption
by Model Context Protocol (MCP) clients.
---
Extending
---------
New renderers can be added by implementing the ``DocRenderer`` protocol
defined in ``docforge.renderers.base``.
---
"""
from .mkdocs_renderer import MkDocsRenderer

View File

@@ -4,6 +4,8 @@ Server layer for doc-forge.
This module exposes server implementations used to provide live access
to generated documentation resources. Currently, it includes the MCP
documentation server.
---
"""
from .mcp_server import MCPServer

View File

@@ -4,16 +4,30 @@ theme:
- scheme: slate
primary: deep purple
accent: cyan
font:
text: Inter
code: JetBrains Mono
features:
- navigation.tabs
# Navigation
- navigation.sections
- navigation.expand
- navigation.top
- navigation.instant
- navigation.tracking
- navigation.indexes
# Content
- content.code.copy
- content.code.annotate
- content.tabs.link
- content.action.edit
# Search UX
- search.highlight
- search.share
- search.suggest
plugins:
- search
@@ -31,8 +45,29 @@ plugins:
annotations_path: brief
show_root_heading: true
group_by_category: true
show_category_heading: true
show_object_full_path: false
show_symbol_type_heading: true
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- tables
- footnotes
- pymdownx.caret
- pymdownx.tilde
- pymdownx.mark