# Turn Mintlify and Fumadocs pages into plain Markdown

> Agno's DocumentationMarkdown transform converts Mintlify and Fumadocs components such as steps, tabs and callouts into plain Markdown while Knowledge.sync_pages publishes your docs.

- Published: 2026-09-16
- Author: Ashpreet Bedi
- Categories: Changelog
- Canonical: https://www.agno.com/articles/turn-mintlify-and-fumadocs-pages-into-plain-markdown
- Markdown: https://www.agno.com/articles/turn-mintlify-and-fumadocs-pages-into-plain-markdown.md

Pass Agno's new `DocumentationMarkdown` to `Knowledge.sync_pages` as its `transform`, and it rewrites each page before Agno chunks and embeds it. Documentation sites serve their pages as MDX full of `<Steps>`, `<Tabs>` and `<Warning>` tags. Without the transform, those tags end up in your chunks and embeddings, and your agent quotes them back to users.

<Video
  src="/videos/changelog-documentation-markdown-terminal.mp4"
  controls
  preload="metadata"
  aria-label="A terminal recording of a Tabs block from docs.agno.com before and after DocumentationMarkdown turns it into plain Markdown"
/>

```python
from agno.knowledge.page import DocumentationMarkdown

report = await knowledge.async_sync_pages(
    url="https://better-auth.com/docs/llms.txt",
    transform=DocumentationMarkdown(profile="fumadocs"),
    index_version="docs-v1",
)
```

![The same page as the site serves it and as Agno stores it, from a real run of DocumentationMarkdown with the mintlify profile. The source MDX has a Documentation Index preamble, a Steps block with two steps, a Tabs block for macOS and Linux, and a Warning callout. The stored Markdown drops the preamble, turns the steps into bold Step 1 and Step 2 headings, turns the tabs into bold macOS and Linux labels, keeps the bash code fence, and ends with a bold Warning label.](https://www.agno.com/images/v3-0-10-documentation-markdown.png)

`DocumentationMarkdown` converts steps, tabs, callouts, cards, fields, media and wrapper components into Markdown. It unwraps components it doesn't know, keeps code fences and indentation exactly as written, and drops the "Documentation Index" preamble that these sites put at the top of every page.

Pick the profile that matches your docs site:

| Profile    | What it does                                                                                            |
| ---------- | ------------------------------------------------------------------------------------------------------- |
| `markdown` | Returns the page unchanged. The default.                                                                |
| `mintlify` | Converts components and drops the preamble. Keeps escapes as written.                                   |
| `fumadocs` | Does the same, and also decodes the HTML escapes that the Fumadocs serializer adds outside code fences. |

`DocumentationMarkdown` never runs JavaScript. It treats attribute expressions as literal strings and leaves inline JSX alone. You can map your own component names onto the built-in ones with `component_aliases`, or render them yourself with `component_renderers`. To convert a single string outside a sync, call `normalize_mdx`, which `agno.knowledge.page` also exports.

Changing the transform changes what you store, so bump `index_version` when you add it to an existing index.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/27_public_pages/documentation_markdown.py), and learn more about [synchronizing published Markdown](https://docs.agno.com/knowledge/published-pages#synchronize-published-markdown) in the documentation. For a production example, see [how we built the Agno Docs Agent](https://docs.agno.com/use-cases/documentation-agents/how-we-built-it).
