mkdocs-site-management
Skill4 starsChanged 11 days agoMITView on GitHub
Guide for creating and maintaining MkDocs sites, ensuring configuration consistency and resolving build issues. Use when working with MkDocs documentation sites, making changes to source directories, or modifying configuration files.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/client-config-opencode/references/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- repository-reviewSkill
- weekly-skill-refreshSkill
- skill-maintenanceSkill
- about-me-skill-creatorSkill
- agent-creator-claudecodeSkill
- agent-creator-codexSkill
- agent-creator-copilotSkill
- agent-creator-opencodeSkill
- client-config-claudecodeSkill
- client-config-codexSkill
- client-config-copilotcliSkill
- client-config-opencodeSkill
- copilot-instruction-creatorSkill
- copilot-workerSkill
- docker-image-managementSkill
- git-commit-messagesSkill
- google-style-docsSkill
- handoffSkill
- markdownlint-validatorSkill
- skill-routerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
32 rules. About 0 are common, 19 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill when:
- Distinctive: line 33
Verify the basic configuration structure exists
- Distinctive: line 37
When files are added, removed, or reorganized in the source directory:
- Very specific: line 39
Analyze the change: Use list_dir to examine the current structure of the docs directory
- Very specific: line 40
Check navigation configuration: Read the mkdocs.yml file and examine the nav section
- Very specific: line 41
Update navigation if needed: If new pages are added or structure changed, update the nav in mkdocs.yml
- Distinctive: line 42
Add new page entries to the navigation
- Distinctive: line 43
Remove entries for deleted pages
- Distinctive: line 45
Validate structure: Ensure the navigation matches the actual file structure
- Very specific: line 49
When making changes to mkdocs.yml:
- Distinctive: line 66
Solution: Check YAML syntax, indentation, and quoting
- Distinctive: line 70
Solution: Verify plugin installation and configuration
- Distinctive: line 74
Solution: Update links to match current file structure
- Distinctive: line 78
Solution: Verify theme name and custom theme paths
- Distinctive: line 82
After any configuration changes:
- Distinctive: line 85
Check for any ERROR or WARNING messages in the output
- Distinctive: line 86
If issues found, resolve them using the appropriate fixes above
- Very specific: line 96
Add the page to mkdocs.yml nav section:
- Very specific: line 102
Run mkdocs build --clean --strict to validate
- Distinctive: line 109
Check if the file exists in docs/
- Very specific: line 110
If file doesn't exist, remove from nav in mkdocs.yml
- Distinctive: line 111
If file exists but path is wrong, correct the path in nav
- Very specific: line 118
Read mkdocs.yml and check indentation
- Distinctive: line 119
Ensure consistent spacing (usually 2 spaces)
- Very specific: line 125
Always run mkdocs build --clean --strict after configuration changes
- Distinctive: line 126
Keep navigation structure aligned with file system organization
- Distinctive: line 127
Use relative paths in navigation
- Very specific: line 129
Test the site with mkdocs serve before deploying
- Very specific: line 134
Solution: Use --clean flag to clear the site directory cache
- Very specific: line 137
Solution: Ensure nav in mkdocs.yml matches current docs/ directory structure
- Very specific: line 140
Solution: Verify plugin is installed and properly configured in mkdocs.yml
- Distinctive: line 143
Solution: Check theme name spelling and ensure custom themes are in correct location
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
MkDocs Site Management
This skill provides comprehensive guidance for creating and maintaining MkDocs documentation sites. It ensures that changes to source directories are properly reflected in the MkDocs configuration and that build issues are systematically resolved.
When to Use This Skill
Use this skill when:
- Setting up a new MkDocs site
- Adding or removing documentation files in the source directory
- Modifying the MkDocs configuration file (mkdocs.yml)
- Troubleshooting MkDocs build failures or warnings
- Ensuring navigation and site structure consistency
Prerequisites
- MkDocs installed in the project environment
- Basic understanding of MkDocs configuration structure
- Access to terminal commands for running MkDocs build
Instructions
1. Initial Setup and Configuration Verification
- Confirm MkDocs is installed by running
mkdocs --versionin the terminal - Locate the configuration file (typically
mkdocs.ymlin the project root) - Identify the source directory (usually
docs/as specified inmkdocs.yml) - Verify the basic configuration structure exists
2. Handling Source Directory Changes
When files are added, removed, or reorganized in the source directory:
- Analyze the change: Use
list_dirto examine the current structure of the docs directory - Check navigation configuration: Read the
mkdocs.ymlfile and examine thenavsection - Update navigation if needed: If new pages are added or structure changed, update the
navinmkdocs.yml- Add new page entries to the navigation
- Remove entries for deleted pages
- Adjust nesting for reorganized directories
- Validate structure: Ensure the navigation matches the actual file structure
3. Modifying MkDocs Configuration
When making changes to mkdocs.yml:
- Make the configuration change: Edit the file using appropriate tools
- Run build validation: Execute
mkdocs build --clean --strictin the terminal - Analyze output: Review the build output for ERROR or WARNING messages
- Resolve issues: Address any errors or warnings found
4. Resolving Build Issues
Common MkDocs build issues and resolutions:
Navigation Errors
- Issue: "Page 'path/to/page.md' listed in navigation but not found"
- Solution: Either add the missing file or remove the entry from nav
YAML Syntax Errors
- Issue: YAML parsing errors in mkdocs.yml
- Solution: Check YAML syntax, indentation, and quoting
Plugin Configuration Errors
- Issue: Plugin-related errors or warnings
- Solution: Verify plugin installation and configuration
Link/Reference Errors
- Issue: Broken internal links or references
- Solution: Update links to match current file structure
Theme Configuration Issues
- Issue: Theme-related warnings or errors
- Solution: Verify theme name and custom theme paths
5. Build Validation and Testing
After any configuration changes:
- Run
mkdocs build --clean --strict - Check for any ERROR or WARNING messages in the output
- If issues found, resolve them using the appropriate fixes above
- Re-run the build to confirm resolution
- Optionally run
mkdocs serveto test the site locally
Examples
Example 1: Adding a New Documentation Page
When adding docs/new-feature.md:
- Add the page to mkdocs.yml nav section:
nav: - Home: index.md - New Feature: new-feature.md - Run
mkdocs build --clean --strictto validate - Resolve any issues if they appear
Example 2: Resolving a Missing Page Error
Build output shows: ERROR - Page 'docs/missing-page.md' listed in navigation but not found
- Check if the file exists in docs/
- If file doesn't exist, remove from nav in mkdocs.yml
- If file exists but path is wrong, correct the path in nav
- Re-run build to confirm fix
Example 3: Fixing YAML Indentation
Build fails with YAML error:
- Read mkdocs.yml and check indentation
- Ensure consistent spacing (usually 2 spaces)
- Fix any indentation issues
- Run build again
Best Practices
- Always run
mkdocs build --clean --strictafter configuration changes - Keep navigation structure aligned with file system organization
- Use relative paths in navigation
- Regularly validate the site build to catch issues early
- Test the site with
mkdocs servebefore deploying
Common Issues
Issue: Build succeeds but site doesn't update
Solution: Use --clean flag to clear the site directory cache
Issue: Navigation shows old structure Solution: Ensure nav in mkdocs.yml matches current docs/ directory structure
Issue: Plugin not working Solution: Verify plugin is installed and properly configured in mkdocs.yml
Issue: Theme not applying Solution: Check theme name spelling and ensure custom themes are in correct location
Additional Resources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

