Importing Documentation
The import command migrates existing documentation from other platforms into Skrypt's format. Component mappings, frontmatter, and navigation structure are handled automatically.
Supported platforms
| Platform | Flag | What's converted |
|---|---|---|
| Mintlify | --from mintlify | MDX components, mint.json nav, Tabs/Cards/Accordions |
| Docusaurus | --from docusaurus | MDX, sidebar config, admonitions, code blocks |
| GitBook | --from gitbook | Markdown, SUMMARY.md nav, hints/tabs |
| ReadMe | --from readme | Markdown, API reference, code samples |
| Notion | --from notion | Exported Markdown/HTML, databases, toggle blocks |
| Confluence | --from confluence | HTML export, macros, page hierarchy |
| Markdown | --from markdown | Plain Markdown files with frontmatter |
Basic import
skrypt import ./mintlify-docs --from mintlify -o ./content/docs
This reads the source directory, converts all content files, maps components to Skrypt equivalents, and writes the result to your output directory.
From a GitHub URL
Import directly from a GitHub repository:
skrypt import https://github.com/org/docs --from docusaurus -o ./content/docs
Skrypt clones the repo to a temp directory, runs the conversion, and cleans up.
Dry run
Preview what would be imported without writing files:
skrypt import ./old-docs --from gitbook --dry-run
Component mappings
Skrypt automatically maps platform-specific components to their equivalents:
Mintlify:
<Card>→<Card><CardGroup>→<Cards><Tabs>/<Tab>→<Tabs>/<TabItem><Accordion>→<Accordion><CodeGroup>→<CodeGroup><Tip>,<Warning>,<Note>→<Callout>
Docusaurus:
:::tip/:::warning/:::info→<Callout>import Tabs/<TabItem>→<Tabs>/<TabItem>
GitBook:
{% hint style="info" %}→<Callout>{% tabs %}→<Tabs>
After importing
After importing, run QA to catch any conversion issues:
skrypt qa ./content/docs --fix
Then preview locally:
npm run dev
Review the navigation structure in docs.json and adjust as needed — the importer generates a best-effort navigation from the source platform's config but you may want to reorganize.