A standard page contains six primary functional zones:
- Menubar: A full-width top navigation bar for global site links.
- Header: A persistent secondary bar. It contains the page title and utility buttons.
- Sidebar: The primary navigation tree, usually on the left.
- Content Area: The central Markdown rendering zone. Includes Breadcrumbs.
- Table of Contents (TOC): Right-hand heading navigation for the current page.
- Footer: Bottom area for copyright, branding, and site-wide links.
Global Component Configuration
The engine uses a modular layout system. Configure most UI zones in the layout section of your docmd.config.json.
Menubar
The menubar provides a high-level navigation layer. It supports brand titles, regular links, and nested dropdowns.
- Location: Fixed at the
topor inline within theheader. - Documentation: See Menubar Configuration for schemas and styling.
The Page Header
The header displays the page title, breadcrumbs, and utility menus.
- Controls: Enable or disable the header globally via
layout.header. Toggle breadcrumbs vialayout.breadcrumbs. - Overriding: Use
hideTitle: truein your Page Frontmatter to hide the title area locally.
Copy Widgets (AI Integration)
To help developers and LLM agents working with your documentation, docmd includes integrated copy buttons in the breadcrumbs bar. These buttons allow copy-pasting the raw Markdown of the page, or the unified LLM context.
Configure these buttons under the theme.copyWidgets settings block in your docmd.config.json:
{
"theme": {
"copyWidgets": {
"enabled": true,
"raw": true,
"context": true
}
}
}
enabled: Set tofalseto disable the copy widgets bar completely.raw: Set tofalseto hide the “Copy Markdown” button.context: Set tofalseto hide the “Copy Context” button.
Utility Menus (Options Menu)
The optionsMenu groups core utilities like Global Search, Theme Toggle, and Sponsorship links.
{
"layout": {
"optionsMenu": {
"position": "header",
"components": {
"search": true,
"themeSwitch": true,
"sponsor": "https://github.com/sponsors/mgks"
}
}
}
}
If the chosen position targets a disabled container, the engine moves the options menu to sidebar-top. This ensures utilities remain accessible.
Sidebar & Navigation
The sidebar is the primary navigation tree. Define its structure in your config or external JSON files.
- Behaviour: Supports animations, collapsible groups, and automatic path preservation.
- Documentation: See Navigation Configuration.
Footer
The engine provides minimal and complete layouts for your site footer.
{
"layout": {
"footer": {
"style": "complete",
"description": "Documentation built with docmd.",
"branding": true,
"columns": [
{
"title": "Community",
"links": [
{ "text": "GitHub", "url": "https://github.com/docmd-io/docmd" }
]
}
]
}
}
}
Keep your Menubar for global links. Use your Sidebar for logical documentation structure. AI agents rely on this hierarchy to understand the relationships between modules.