# Import and export

Bring content in from Markdown, Word, HTML or a whole folder, and take it out as Markdown.

## Import

| What | Where | Notes |
| --- | --- | --- |
| One Markdown, Word (`.docx`) or HTML file | Space or page menu → **Import Markdown, Word or HTML** | Creates a page, or replaces a page's content. |
| A folder of Markdown as a ZIP | Space menu → **Import a folder (.zip)** | GitBook exports, GitHub "Download ZIP", any zipped folder. |
| A Git repository | [Git Sync](git-sync) | Keeps importing as you push. |

Folder imports show a preview before anything changes: the page outline, how many pages, groups and
files, Markdown files left out, images the pages reference that the archive doesn't contain, and
links that don't lead to an imported page. Imports **add** pages after the ones already there; they
never replace existing pages.

Replacing a page's content from a file keeps the page's title, and History keeps the previous
content so you can restore it.

{% hint style="info" %}
In a space that requires review, import into a change request — the published content only changes through
review.
{% endhint %}

## Export

Choose **Export as Markdown (.zip)** from the space menu to download the space as a ZIP of Markdown:

```
SUMMARY.md            # the table of contents; groups become headings
.docsheaf.yaml        # the same format as GitBook's .gitbook.yaml
getting-started.md
guides/
  README.md           # a page with sub-pages
  deploy.md
.docsheaf/assets/     # uploaded images and files
```

Each page keeps its fields as front matter, links between pages become relative file paths, and
uploads are rewritten to point into `.docsheaf/assets/`. Exports work on the published content and
on any change request.

Every published page is also available as Markdown by adding `.md` to its URL. See
[LLM-ready docs](llm-ready-docs).
