MDX export
Download each published page as an MDX file with front matter and a version marker, then add it to your site yourself.
Use MDX export when you publish through Git or another manual step.
Set it up
In Publishing, leave the Delivery endpoint empty. Under Without an SDK connection, choose MDX export and save.
When you publish, the page shows Your MDX file is ready. Select
Download MDX to get the file. An agent gets it with the export_content
tool.
The file
---
title: "A guide to AI search"
description: "How AI assistants choose which brands to name."
path: "/blog/ai-search-guide"
rootsmithId: "11111111-1111-1111-1111-111111111111"
rootsmithVersion: 4
---
<div
data-rootsmith-content="11111111-1111-1111-1111-111111111111"
data-rootsmith-version="4"
hidden
/>
## Why it matters
...- Front matter has the title, description, path, page ID, and version.
- The hidden element is the version marker. Keep it in the rendered page.
- The body is safe to load. Characters MDX would run as code, such as
{,<, and line-leadingimportorexport, are escaped outside code.
Publish the file
- Save the file where your site expects MDX, at a route that matches
path. - Deploy your site.
- RootSmith marks the page published when it finds the version marker at
https://<your domain><path>. It checks every five minutes for 24 hours. You can also confirm the page by hand.