# pages

> Standalone HTML or Markdown pages, in versions that never change; share one with your organization, teams, people or a public link.

Standalone HTML or Markdown pages, in versions that never change; share one with your organization, teams, people or a public link.

## nexus pages publish

```sh
nexus pages publish <file> [--title T] [--format html|md|jsx|board]
```

Publish an HTML, Markdown, React (.jsx, .tsx) or board (.board.json) file as a new page (version 1); the title defaults to its <title> or first heading.

| Option | Meaning |
| --- | --- |
| `--title <T>` | The page's title (default: its <title> or first # heading, else the file name) |
| `--format <html|md|jsx|board>` | Html, md, jsx, sheet or board (default: from the file name; .md and .markdown are Markdown, .jsx and .tsx are React, .sheet.json is a sheet, .board.json is a board) |

```sh
nexus pages publish report.html
```

## nexus pages list

```sh
nexus pages list
```

Your pages, most recently written first.

## nexus pages get

```sh
nexus pages get <id> [<version>] [--source] [--out file]
```

A page's latest version, or the one named; --source prints or saves its source as written.

| Option | Meaning |
| --- | --- |
| `--source` | The source as written, not the version's details |
| `--out <file>` | Write the source to this file instead of stdout |

```sh
nexus pages get pag_… --source --out report.html
```

## nexus pages update

```sh
nexus pages update <id> <file> [--base N] [--title T]
```

Write the next version from a file; --base refuses it if someone wrote a newer version since.

| Option | Meaning |
| --- | --- |
| `--base <N>` | The version this was built on: refused if someone wrote a newer version since |
| `--title <T>` | The page's title (default: its <title> or first # heading, else the file name) |

```sh
nexus pages update pag_… report.html --base 2
```

## nexus pages versions

```sh
nexus pages versions <id>
```

A page's versions, newest first: title, size and how each was written.

## nexus pages restore

```sh
nexus pages restore <id> <version> [--base N]
```

Make a new version with an old version's title and content.

| Option | Meaning |
| --- | --- |
| `--base <N>` | The version this was built on: refused if someone wrote a newer version since |

```sh
nexus pages restore pag_… 1
```

## nexus pages delete

```sh
nexus pages delete <id> --yes
```

Delete a page, every version and its content, for good.

| Option | Meaning |
| --- | --- |
| `--yes` | Confirm a change that deletes or sends more than one thing |

```sh
nexus pages delete pag_… --yes
```

## nexus pages share

```sh
nexus pages share <id> [--org | --team T | --people a@x,b@y | --to a@x,b@y | --public [--expires 30d]] [--pin N]
```

Share a page with your organization, teams, people, named outsiders or anyone with the link; --pin N pins that version, else readers see the latest.

| Option | Meaning |
| --- | --- |
| `--org` | Share with everyone in your organization |
| `--team <T>` | Share with these teams (slugs, comma-separated) and the teams under them |
| `--people <a@x,b@y>` | Share with these people in your organization (emails, comma-separated) |
| `--to <a@x,b@y>` | Share outside your organization with these people (emails, comma-separated); they sign in with that email to open it |
| `--public` | Share with anyone who has the link (unguessable, not indexed by search engines) |
| `--expires <30d>` | When a public link stops working: 30d, 12h or a number of days |
| `--pin <N>` | Share this version of the page; without it, readers see the latest version |

```sh
nexus pages share pag_… --team web --pin 2
```

## nexus pages open

```sh
nexus pages open <id|art_id> [<version>] [--no-browser]
```

Open a page (or a version of it) or a shared page (its art_ id) in Nexus UI's viewer.

| Option | Meaning |
| --- | --- |
| `--no-browser` | Only print the approval link; do not open a browser |

## nexus pages frame

```sh
nexus pages frame <id|art_id> [<version>]
```

Print a signed URL that renders the page (the latest version, or the one named) with no sign-in, for five minutes.

## nexus pages export

```sh
nexus pages export <id> [<version>] --format png|svg|pdf|pptx|html|zip [--board B] [--scale 1|2] [--out file]
```

Write the page as a file: one board as PNG or SVG, every board as PDF, PPTX or zip, or the page as standalone HTML; --board picks one board, or a deck's slide by its title or number.

| Option | Meaning |
| --- | --- |
| `--format <png|svg|pdf|pptx|html|zip>` | Png or svg (one board), pdf (one page per board), pptx (one slide per board), html (the page, opens offline) or zip |
| `--board <B>` | One board or slide, by its data-id, its name or its number from 1; a PNG or SVG of a design or a deck with several needs one |
| `--scale <1|2>` | 1 or 2: the pixel ratio the boards render at (default: 2 for pdf and pptx, else 1) |
| `--out <file>` | Write the file here (default: <id>[-<board>].<format> in the working directory) |

## nexus pages check

```sh
nexus pages check <id> [<version>]
```

Check a design against its design system: colours, font sizes and spacing off its tokens, and text below WCAG AA contrast; it changes nothing.
