This repository includes automated documentation validation to ensure quality and consistency.
- Trigger: Every pull request to any branch
- Validation: Comprehensive documentation checks
- Status: Required check (blocks merge if validation fails)
- ✅ Broken internal links - All internal links point to existing files
- ✅ Missing images - All image references point to existing files
- ✅ Self-referencing redirects - No redirects where source equals destination
- ✅ Navigation-redirect conflicts - No conflicts between navigation and redirects
- ✅ Invalid redirects - No redirects with empty source or destination
- ✅ Missing navigation files - All navigation entries point to existing files
- ✅ Missing redirect destinations - All redirect destinations point to existing files
You can run validation locally before creating a PR:
# Full validation (recommended)
python scripts/validate_mintlify_docs.py . --validate-redirects --verbose
# Check only links
python scripts/validate_mintlify_docs.py . --links-only
# Check only images
python scripts/validate_mintlify_docs.py . --images-only
# Check only redirects and navigation
python scripts/validate_mintlify_docs.py . --validate-redirects
To make validation required:
- Go to Settings → Branches in your GitHub repository
- Add a branch protection rule for your target branches (e.g.,
main
,deploy
) - Enable "Require status checks to pass before merging"
- Select "Validate Documentation / validate" as a required check
- Enable "Require branches to be up to date before merging"
The scripts/validate_mintlify_docs.py
script provides comprehensive documentation validation:
- No external dependencies - Uses only Python standard library
- Fast execution - Typically completes in under 1 minute
- Clear reporting - Detailed error messages with file locations
- Exit codes - Returns non-zero exit code if issues found (perfect for CI)
- Broken internal links: Update the link path or add a redirect
- Missing images: Add the image file or update the image path
- Navigation issues: Ensure all navigation entries point to existing files
- Redirect problems: Check redirect sources and destinations are valid
If validation fails:
- Check the GitHub Actions log for detailed error messages
- Run validation locally to debug issues
- Fix the reported issues and push updates to your PR