graph LR
CLI_Command_Dispatcher["CLI & Command Dispatcher"]
Build_Command_Handler["Build Command Handler"]
Serve_Command_Handler["Serve Command Handler"]
GitHub_Deploy_Command_Handler["GitHub Deploy Command Handler"]
CLI_Command_Dispatcher -- "dispatches to" --> Build_Command_Handler
CLI_Command_Dispatcher -- "dispatches to" --> Serve_Command_Handler
CLI_Command_Dispatcher -- "dispatches to" --> GitHub_Deploy_Command_Handler
Serve_Command_Handler -- "may invoke" --> Build_Command_Handler
click CLI_Command_Dispatcher href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/mkdocs/CLI_Command_Dispatcher.md" "Details"
The CLI & Command Dispatcher subsystem is primarily defined by the mkdocs/__main__.py file, which serves as the main entry point for the MkDocs command-line interface, and the mkdocs/commands/ directory, specifically the build.py, serve.py, and gh_deploy.py modules. These files collectively manage command parsing, dispatching, and the initial execution of core MkDocs operations.
CLI & Command Dispatcher [Expand]
This component acts as the central orchestrator and primary user interface for MkDocs. It is responsible for parsing command-line arguments, initializing the CLI environment (e.g., enabling warnings), and dispatching control to the appropriate command-specific handler based on the user's input (e.g., build, serve, gh_deploy). It is the initial point of contact for all user-initiated operations.
Related Classes/Methods:
This component encapsulates the core logic for generating the static documentation site. When invoked, it orchestrates the entire build pipeline, including loading configuration, processing Markdown content, applying themes, and writing the final static HTML and associated assets to the output directory.
Related Classes/Methods:
This component manages the local development server functionality. It typically initiates an initial site build, then serves the generated static files, and often includes a file watcher to automatically trigger rebuilds and browser reloads upon detecting changes in source files.
Related Classes/Methods:
This component handles the specialized logic for deploying the generated static site to GitHub Pages. It manages the necessary Git operations, branch handling, and pushing the compiled documentation to the remote GitHub repository.
Related Classes/Methods: