Migrate from Docusaurus
Docusaurus sites are Markdown and MDX files in a Git repository, so the content is already in your hands. This guide shows how to turn your docs/ folder into a Theneo project folder, how to rewrite admonitions and MDX components, and what to do with versions and your API reference.
At a glance
Markdown (headings, lists, links, tables, code fences with titles) | Imports as is. |
Admonitions ( | Rewrite to Callouts first. Without it, they import as literal text. |
| Rewrite to Theneo Tabs and Accordions first. |
MDX | Do not transfer. |
| Recreate them as the |
Versioned docs | Import each version into its own Theneo project version. |
Before you start
- Clone your Docusaurus repository. Pages live in
docs/(andversioned_docs/if you use versions), the sidebar insidebars.js, and images instatic/. - If you generate API pages with an OpenAPI plugin, find the spec file it reads from.
- Install Node.js 18 or later for the Theneo CLI.
Build the Theneo project folder
1
Create a project folder
Make an empty folder (for example theneo-docs/). Each page becomes its own folder with an index.md (the content) and a section.json (use the default from Project Folder Structure). Nested folders become nested pages.
2
Move your pages
Copy each page into its own folder as index.md (for example docs/guides/install.mdx becomes guides/install/index.md). Other .mdx file names are not read by the importer, so the rename matters. A folder's index.md (or index.mdx) is the page of that folder. Use sidebars.js and the _category_.json labels to set the order and names.
3
Write theneo.json
Add a theneo.json at the root with your project name and a sections array that lists every page folder in sidebar order. Only sections listed here are imported, so add every page. The name you set here is the sidebar label.
4
Add your API spec (optional)
Put your OpenAPI file at the root of the folder and add "apiSpec": "openapi.yaml" to theneo.json. The same import then builds your API reference next to your guides.
The frontmatter title becomes the page name if theneo.json does not set one. A frontmatter description is added to the top of the page as its first paragraph, so delete it if you do not want it shown. sidebar_label, sidebar_position, id and slug are not read.
Convert Docusaurus components
Rewrite these in each index.md. Everything not listed here is plain Markdown and needs no change.
|
| Close it with |
|
| |
|
| |
Admonition title ( | A bold first line inside the Callout | |
|
| Use the label as the tab name. |
|
| Imported as is, the content shows as plain text and is no longer collapsible. |
| Remove them, or replace with Theneo widgets | |
Code fences with | No change | Import as code blocks. |
Mermaid code fence | Re-add with the Mermaid widget in the editor | Imports as a code block. |
For example, an admonition and a tab group:
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
:::warning
Rotate keys every 90 days.
:::
<Tabs>
<TabItem value="npm" label="npm">npm install acme</TabItem>
<TabItem value="yarn" label="yarn">yarn add acme</TabItem>
</Tabs>
becomes:
<Callout attributes='{"dataType":"warning"}'>
<p>Rotate keys every 90 days.</p>
</Callout>
<Tabs attributes='{"tabs":["npm","yarn"]}'>
<TabPanel tabTitle="npm"><p>npm install acme</p></TabPanel>
<TabPanel tabTitle="yarn"><p>yarn add acme</p></TabPanel>
</Tabs>
Fix images and links
Image paths such as /img/setup.png or ./img/setup.png point at files in your repository, and the importer does not upload them. Replace each with a public absolute URL, for example from your current site. Links between pages such as ./install.md also keep their Docusaurus paths, so update them to the new Theneo page URLs after import.
Bring your API reference and versions
- API reference. Put the OpenAPI file your plugin uses at the root of the Theneo project folder and set
apiSpecintheneo.json. - Versions. Build one Theneo project folder per version from
versioned_docs/, create the versions in your Theneo project, and import each folder withtheneo import --project acme-docs --projectVersion <version-slug> --dir <folder>.
Import into Theneo
1
Create an empty project
npm install -g @theneo/cli
theneo login
theneo project create --name "Acme Docs" --empty
2
Validate the folder
theneo audit --dir ./theneo-docs
CLI audit checks the structure, theneo.json, and widget syntax (including Callout types and attributes JSON). Fix every error before importing.
3
Import
theneo import --project acme-docs --dir ./theneo-docs
Use the project slug from step 1. Importing into a project replaces its content, so import into a new project and review there.
4
Review and publish
Open the project in the editor, check pages that used components or images, then publish when you are ready.
Migrate with AI
theneo migrate does this conversion for you. Run it in your Docusaurus repository and choose your coding agent. The CLI installs Theneo's conversion skill, which already knows the Docusaurus components in the table above, and hands your agent a prompt. The agent builds the project folder in converted_for_theneo/, runs theneo audit until it is clean, and shows you a preview before anything is imported. See Migrate with an AI Agent.
cd ./your-docusaurus-docs
theneo migrate
Prefer to drive the agent yourself? Give it this prompt instead:
Convert the Docusaurus docs in ./source into a Theneo project folder at ./theneo-docs.
- One folder per page with index.md and the default section.json.
- A theneo.json with "name" and a "sections" array in the same order as the Docusaurus navigation.
- Rewrite Docusaurus components into Theneo widgets using the conversion table on
https://docs.theneo.io/get-started/migrate-to-theneo/migrate-from-docusaurus
- Replace relative image paths with absolute URLs and list any you could not resolve.
- Run "theneo audit --dir ./theneo-docs" and fix every error.
After the import, you can keep editing with AI by connecting the Theneo MCP server to Claude or another MCP client, so it can read and update sections in your project directly.
What does not transfer
- Custom React components, swizzled theme components and plugins.
- Blog posts and translations in
i18n/.
Stuck on a component, a large project, or a custom setup? Email hello@theneo.io and the team will look at your project with you.
On this page
- Migrate from Docusaurus