Skip to content

docs: explain how custom React components appear in Markdown export - #7946

Merged
brandonmcconnell merged 3 commits into
mainfrom
brandon/markdown-export-custom-components
Oct 21, 2026
Merged

brandonmcconnell merged 3 commits into
mainfrom
brandon/markdown-export-custom-components

Conversation

@brandonmcconnell

@brandonmcconnell brandonmcconnell commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Documentation changes

Documents how custom React components and imported snippet data appear in Markdown exports. The "Components and HTML" section already covers built-in components, HTML, and snippets, but not JSX components or data. Customers like Perplexity had to reverse-engineer that behavior from other sites' output.

  • ai/markdown-export: new "Custom React components" subsection under "Components and HTML".

    • Markdown exports never include component source code or imported data.
    • Components with static output render as Markdown.
    • Interactive components keep only their children and their title, description, alt, and href props, or are omitted if they have none.
  • components/visibility: new "Interactive components" section.

    • A calculator example pairs a for="humans" widget with a for="agents" rate table.
    • It clarifies that Visibility isn't needed to keep code out of Markdown.
  • Translations: the same sections are added to the es, fr, and zh pages, using the existing <div id> wrappers so the English anchors work in every language.

  • Agent skill (agent-context): updates the Visibility entry in reference/components.md, which told agents to wrap custom components in for="humans" to keep code out of Markdown. Also adds a Markdown output bullet to reference/customization/react-and-snippets.md. skill.md is generated only from SKILL.md, so it doesn't change, and npm run check and npm test pass.

Reflects the markdown flattening behavior shipped in mintlify/mint#12927 and the stacked PRs above it.


For Reviewers

When reviewing documentation PRs, please consider:

✅ Technical accuracy

  • Code examples work as written
  • Commands and configurations are correct
  • Links resolve to the right destinations
  • Prerequisites and requirements are accurate

✅ Clarity and completeness

  • Instructions are clear and easy to follow
  • Steps are in logical order
  • Nothing important is missing
  • Examples help illustrate the concepts

✅ User experience

  • A new user could follow these docs successfully
  • Common gotchas or edge cases are addressed
  • Error messages or troubleshooting guidance is helpful

Note

Low Risk
Documentation-only updates with no runtime, auth, or data-handling changes.

Overview
Documents how custom React components and imported snippet data show up in Markdown export (.md URLs and llms-full.txt), matching the flattening behavior from the product change.

ai/markdown-export gains a Custom React components subsection: exports never include component source or imported props/data; static components become Markdown; interactive ones only keep children plus title, description, alt, and href (otherwise omitted). components/visibility adds Interactive components with a pricing-calculator vs. agent table example and clarifies that Visibility is for audience-specific content, not for stripping code from Markdown.

The same sections land in es, fr, and zh with stable #custom-react-components / #interactive-components anchors. Agent skill references update the old guidance that suggested wrapping custom components in for="humans" only to hide source from Markdown.

Reviewed by Cursor Bugbot for commit ca727cd. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mintlify Docs 🟢 Ready View Preview Oct 21, 2026, 7:23 PM

…fr, zh

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@ethanpalm ethanpalm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@brandonmcconnell
brandonmcconnell merged commit 36cf34d into main Oct 21, 2026
6 checks passed
@brandonmcconnell
brandonmcconnell deleted the brandon/markdown-export-custom-components branch October 21, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants