# Import your docs

> Turn a docs website, a folder or .zip, a Notion or Confluence export, or a GitHub repository into a private draft on Typemark, with or without an account. Keep it when it looks right.

The import page at [typemark.dev/import](https://typemark.dev/import) turns your current docs into a Typemark site in a minute or two. You don't need an account. The result is a private [draft](https://docs.typemark.dev/drafts) that only your browser can open. If you like it, keep it, and it becomes a project on your account.

Already signed in? Click **New project** on the dashboard and choose **Import your docs**. See [Signed in](#signed-in).

It reads your docs from one of three places:

| Tab | What you give it |
|-----|------------------|
| **Web address** | The address of your published docs, such as `docs.example.com` |
| **Folder or .zip** | Your docs folder, or a .zip of it, such as a Notion or Confluence export |
| **GitHub** | A public repository, such as `github.com/acme/docs`, or a folder in it. Signed in, one of your own repositories, private ones too |

## Import your docs

<Steps>
  <Step title="Open the import page">
    Go to [typemark.dev/import](https://typemark.dev/import), or click **Import your docs** on typemark.dev.
  </Step>
  <Step title="Say where your docs are">
    Choose **Web address**, **Folder or .zip** or **GitHub**, and fill it in. **Rewrite with AI** is on: AI rewrites each page with Typemark's components and checks it against your docs. See [Import with AI](https://docs.typemark.dev/ai/import-with-ai).
  </Step>
  <Step title="Make a draft">
    Click **Make a draft**. A bot check runs first, and most people never see it. The page then shows each step as it happens. It takes a minute or two.

    If you close the page, the import keeps going. Come back to typemark.dev/import in the same browser within 24 hours to see it.
  </Step>
  <Step title="See your draft">
    Click **See your draft**. Your docs open as a Typemark site. The **Import summary** button in the banner lists what was imported and what was left out.
  </Step>
  <Step title="Keep it">
    Click **Keep these docs** in the banner, and sign up or sign in if you aren't already. The draft becomes a project with its own address. See [Drafts without an account](https://docs.typemark.dev/drafts#keep-it).
  </Step>
</Steps>

## From a web address

Type the address of your docs. Typemark finds your pages through the site's `llms.txt` first, then its sitemap, then the links from page to page.

It stays inside your docs. From `example.com/docs/intro`, it reads the pages under `/docs/` and docs folders beside it, such as `/reference/` and `/api/`, but not your blog or the rest of the site. It follows your `robots.txt` and reads two pages a second, so your site isn't overloaded.

What comes over:

- **Each page's text** as MDX, with its title and description in the frontmatter. The site's header, sidebar, footer and table of contents are left out of the page.
- **Navigation.** The items in your site's header become tabs, and the sections of its sidebar become groups, in the same order.
- **Components.** Callouts, collapsible sections, videos and cards become Typemark components. Code blocks come over whole, with their titles.
- **Branding.** Your logo, favicon, main colour and footer links go into [`typemark.json`](https://docs.typemark.dev/configuration/typemark-json).
- **Your API reference.** A page drawn by Redoc, Swagger UI, Scalar, Stoplight Elements or RapiDoc, or a link to an OpenAPI file, brings the spec with it. Every endpoint gets a page. Up to three specs are imported.
- **Links** between imported pages point to the new pages.
- **A site on one page.** If your docs are one long page, as Slate makes them, each section becomes its own page, and links to a section point to its new page.
- **Dates** of blog and changelog posts.

A ReadMe site comes over whole: the guides and the API reference in their own tabs, each endpoint as an [endpoint page](https://docs.typemark.dev/api-reference/openapi#write-an-endpoints-page), and header links that leave your docs, such as a support site. See [From ReadMe](https://docs.typemark.dev/migrating/readme#import-the-published-site).

Images stay where they are: the draft shows them from your old site. Before you turn the old site off, download them into your project and update the links.

Some pages are left out on purpose, and the summary lists them: the search page, lists of posts, tags and authors, pages that only say "Loading…", copies of a page that was already imported, and legal pages linked from the footer.

<Callout type="warning">
  Typemark doesn't run your site's JavaScript. If your pages only show their text after a script runs, the import finds nothing to read. Upload your docs' source as a .zip instead.
</Callout>

| What | Limit |
|------|-------|
| Pages | 300 |
| One page | 2 MB |
| All pages together | 30 MB |
| Time | 5 minutes |

When an import reaches a limit, it stops, keeps what it has read, and says so in the summary.

## From a folder or .zip

Drop your docs folder or a .zip of it on the page, or click to choose one. A folder is zipped in your browser before it's sent, without `node_modules`, hidden files and file types a docs site doesn't use. The upload can be up to 25 MB, and up to 100 MB once unpacked.

Typemark looks at what's inside:

- **A Typemark site**, with a `typemark.json`, is kept as it is.
- **A Mintlify, GitBook or ReadMe site** is converted exactly as the GitHub import converts it. See [From Mintlify](https://docs.typemark.dev/migrating/mintlify), [From GitBook](https://docs.typemark.dev/migrating/gitbook) and [From ReadMe](https://docs.typemark.dev/migrating/readme).
- **A Docusaurus or MkDocs site** is converted with its navigation, callouts and tabs. See [Docusaurus and MkDocs](#docusaurus-and-mkdocs).
- **A Notion or Confluence export** is converted with its page tree as the navigation. See [Notion and Confluence exports](#notion-and-confluence-exports).
- **Anything else with Markdown files** becomes pages: the `docs/` folder if it has pages, otherwise every Markdown file. A folder's `README.md` or `index.md` becomes the folder's page, and each folder becomes a group in the navigation.

Some files are left out, and the summary lists them: symbolic links, archives inside the archive (except the parts of a Notion export split into several .zip files), text files over 2 MB, images and other media over 5 MB, and file types a docs site doesn't use. Custom CSS and scripts aren't imported: a draft never runs code you upload.

With **Rewrite with AI** on, your files go to our AI provider to be rewritten. Turn it off to use our rules alone. A Typemark or Mintlify site doesn't need AI, so AI doesn't run on it.

### Docusaurus and MkDocs

A Docusaurus or MkDocs site in a folder, a .zip or a GitHub repository becomes a draft with its own structure. Typemark reads its configuration as data and never runs it.

<Tabs>
  <Tab title="Docusaurus">
    Typemark finds `docusaurus.config.js` (or `.ts`) at the top or up to two folders down, and imports the docs folder beside it.

    - **Navigation** comes from `sidebars.js` or `sidebars.ts`. Each sidebar becomes a tab and each category a group, its own page first. A category inside another becomes a group after its parent. Autogenerated sidebars follow your folders, `_category_` files, `sidebar_position` and number prefixes.
    - **Admonitions** such as `:::tip` become callouts, `<Tabs>` and `<TabItem>` become [tabs](https://docs.typemark.dev/components/tabs), and `<details>` becomes an [accordion](https://docs.typemark.dev/components/accordions).
    - **Images** in `static/` move to `images/`, and an image a page imports, such as `import Shot from './img/shot.png'`, keeps its file.
    - **Imports and exports** are removed. Partials are copied into the pages that use them. A component Typemark doesn't have keeps its text, and the summary lists it under **Left as written**.
    - **Your old addresses** redirect: a page Docusaurus served at `/docs/guides/setup` redirects to its new address.

    The blog, versioned docs and translations in `i18n/` aren't imported. The summary says so.
  </Tab>
  <Tab title="MkDocs">
    Typemark finds `mkdocs.yml` at the top or up to two folders down, Material for MkDocs included, and imports its docs folder, `docs` unless `docs_dir` names another.

    - **Navigation** comes from `nav` in `mkdocs.yml`. A section becomes a group. With Material's `navigation.tabs`, each top-level section becomes a tab. Without `nav`, the folders become groups.
    - **Admonitions** such as `!!! note` become callouts, `???` and `???+` become [accordions](https://docs.typemark.dev/components/accordions), and `=== "Tab"` becomes [tabs](https://docs.typemark.dev/components/tabs).
    - **Attribute lists** such as `{ .annotate }` are removed. Snippets, `mkdocstrings` and macros stay as text, and the summary lists them under **Left as written**.
    - **Pages keep their addresses.** A page whose address changes gets a redirect.
  </Tab>
</Tabs>

Docusaurus and MkDocs are converted only into an import's draft. Connecting a GitHub repository to a project, and `typemark migrate`, convert only Mintlify, GitBook and ReadMe. To bring a Docusaurus or MkDocs site into a project, import it here and keep the draft.

### Notion and Confluence exports

Export your pages from Notion or Confluence, then drop the .zip on the import page as it downloaded. You don't need to unzip it.

<Tabs>
  <Tab title="Notion">
    In Notion, open the page that holds your docs, choose **Export** in its **•••** menu, pick **Markdown & CSV** and include subpages. A big workspace downloads as a .zip of several .zip files. Drop that one .zip as it is. A database exported without its subpages imports as one page holding its table.

    - **Navigation** follows your page tree. The page you exported becomes the first page, and each page under it with pages of its own becomes a group.
    - **Titles and addresses** lose Notion's IDs: `Getting Started 1a2b….md` becomes `/getting-started`. Links between your pages point to the new pages, and so do links to `notion.so` pages that are in the export.
    - **Callouts** become [callouts](https://docs.typemark.dev/components/callouts), their emoji choosing the kind, and toggles become [accordions](https://docs.typemark.dev/components/accordions). A database row's properties become a list under its title.
    - **Databases** become tables, each row's name linking to its page: on the page that shows the database, or on a page of their own.
    - **Images and files** move to `images/`. An image pasted into a page as data is left out, and the summary says so.
  </Tab>
  <Tab title="Confluence">
    In Confluence, open the space's settings, choose **Export space**, pick **HTML** and export the whole space or the pages you want.

    - **Navigation** follows the space's page tree from `index.html`. The home page becomes the first page. A page the tree doesn't list goes under its parent, from its breadcrumbs.
    - **Each page's content** comes over. The breadcrumbs, "Created by", the attachments list and the footer are left out.
    - **Macros** become components: info, tip, note and warning panels become [callouts](https://docs.typemark.dev/components/callouts), code blocks keep their language and title, and expand blocks become [accordions](https://docs.typemark.dev/components/accordions). The table of contents is left out, since Typemark shows one beside every page.
    - **Links** between your pages point to the new pages. A link to a page that isn't in the export becomes plain text, and the summary lists it.
    - **Attachments** a page shows or links to move to `images/` under their own names. The others are left out.
  </Tab>
</Tabs>

Notion and Confluence exports are converted only into an import's draft. To bring one into a project, import it here and keep the draft.

## From a GitHub repository

Type the repository's address, such as `github.com/acme/docs`, or a folder in it, such as `github.com/acme/site/tree/main/docs`. Typemark downloads the repository, up to 25 MB, and imports it as it would a .zip. It doesn't need access to your GitHub account.

For a private repository, sign in with the GitHub App installed. The GitHub tab then lists your repositories under **Your repositories**, private ones marked, above the public address field. The list shows up to 1,000 repositories; type to find one. Choose one, and Typemark makes a draft from it once. Nothing is connected: the draft and the project you keep aren't linked to the repository. If a repository is missing from the list, give the GitHub App access to it on GitHub, then come back.

To keep your docs in GitHub and publish from the repository, connect it to a project instead. See [Connecting to GitHub](https://docs.typemark.dev/github/connecting).

## Signed in

The import page works the same when you're signed in, with three differences:

- **AI works on your account.** On Pro and Enterprise, AI improves every page of the draft, with no 50-page preview. On Free, so does a site of up to 50 pages, and your first larger import, which uses your one AI import. The page shows your plan and the pages AI can still improve on your account this month. See [Import while signed in](https://docs.typemark.dev/ai/import-with-ai#import-while-signed-in).
- **Your private repositories** are listed on the GitHub tab, once the GitHub App is installed.
- **Keeping the draft is one click.** The **Keep these docs** page has your site's address filled in.

## How many you can import

Each IP address can make 3 drafts an hour and 10 a day. Imports and [`typemark push --draft`](https://docs.typemark.dev/automation/cli#push-a-draft-without-an-account) count together. A draft holds up to 500 pages, the pages generated from OpenAPI specs included. For more, sign up and connect a GitHub repository, or use the [Typemark CLI](https://docs.typemark.dev/automation/cli#migrate-from-another-platform).

## After you keep it

The project you get is hosted by Typemark and starts offline. Read the import summary before you keep the draft, then work through the [go-live checklist](https://docs.typemark.dev/migrating/overview#go-live-checklist).
