# Import & Export

> PPTX, PDF, Google Slides, static sites, and single-file HTML

## Static site

```bash
narro build              # a scaffolded project
narro build deck.md      # a single markdown deck
narro preview --outDir dist
```

`dist/` is a plain static site. This is the highest-fidelity way to share a
deck: animations, embeds, and live components all still work.

## Single-file HTML

```bash
narro bundle
```

Inlines everything — JS, CSS, images — into one `.html` file that opens from a
filesystem with no server. This is the format to use when you are presenting
from a machine you do not control, or emailing a deck to someone who will not
run a build.

Images are base64-inlined, so an image-heavy deck produces a large file.

## PDF

```bash
narro export --to pdf
```

One page per slide, fragments flattened to their final state. For handouts.

## PowerPoint

```bash
narro export --to pptx output.pptx
narro export --to pptx output.pptx --template-path corporate.potx
```

Slides map onto real PowerPoint shapes rather than screenshots, so text stays
selectable and editable. Passing a `.potx` applies your organisation's master —
the usual reason a deck has to become PPTX at all.

What does not survive: animations beyond simple builds, embedded web content,
and anything driven by a live component. Those become their rendered state.

## Google Slides

```bash
narro export --to google-slides
narro export --to google-slides --template-id <id>
```

Needs Google OAuth credentials in the environment; the CLI walks through the
consent flow on first run.

## Importing

```bash
narro import deck.pptx
narro import --from google-slides <presentation-id>
```

Produces Narro slides from an existing deck: text, structure, images, and
speaker notes come across.

Treat the output as a starting point rather than a finished deck. PowerPoint
positions everything absolutely, so a faithful import is a pile of
`CanvasElement`s that will not reflow — readable, but not yet using layouts.
The usual workflow is to import, then convert the slides that matter into
`SlideContent` and layout components, and leave the rest.

`narro analyze-slides-for-components` reports which `shared-ui` components an
imported deck could be rewritten with, which makes that pass faster.