
MkDocs AI Integration
AI answers for MkDocs and Material for MkDocs sites
About MkDocs
MkDocs is a Python-based static site generator for project documentation. The Material for MkDocs theme is widely used in open-source and enterprise projects to produce professional documentation from Markdown files.
How BeforeQuery works with MkDocs
Everything you can do once the MkDocs integration is connected.
Sitemap-aware discovery
BeforeQuery reads the MkDocs-generated sitemap.xml to discover all pages, including those in nested nav sections.
Clean content extraction
The crawler strips Material for MkDocs's navigation, sidebar, and footer, extracting only the documentation content for indexing.
Multi-language support
Index MkDocs sites with multiple language variants. BeforeQuery tracks each language path separately.
Deploy hook integration
Trigger a BeforeQuery sync from your CI/CD pipeline after mkdocs build and deploy to keep the index current.
How to connect MkDocs
- Step 01
Enter your MkDocs site URL in BeforeQuery. The crawler will use the sitemap.xml to index all pages.
- Step 02
Review the crawled page list and configure any URL exclusions for pages you do not want indexed.
- Step 03
Add the BeforeQuery widget script to your MkDocs custom_html overrides (overrides/main.html) to embed AI chat.
Related integrations
BeforeQuery crawls your Mintlify docs site, keeps it in sync, and answers user questions with the source shown.
Crawl, sync, and embed AI chat on any Docusaurus v2 or v3 documentation site.
Index your GitBook spaces and let users ask questions with full links back to source pages.
MkDocs — Frequently Asked Questions
Common questions about connecting BeforeQuery to MkDocs.
Ready to connect MkDocs?
Start free. No credit card required. Connect your first integration in under 5 minutes.