# @kromiii/notion-to-slides

> Convert notion page to pdf slides

Latest version **0.1.15** (published 2025-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kromiii/notion-to-slides
pnpm add @kromiii/notion-to-slides
yarn add @kromiii/notion-to-slides
bun add @kromiii/notion-to-slides
```

Provides the command `notion-to-slides`.

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.15 |
| Published | 2025-01-25 |
| First published | 2023-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Hiroyuki Kuromiya |
| Maintainers | kromiii |
| Keywords | notion |

## Links

- npm: https://www.npmjs.com/package/@kromiii/notion-to-slides
- npm.io page: https://npm.io/package/@kromiii/notion-to-slides

## Dependencies (8)

- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [opener](https://npm.io/package/opener.md) ^1.5.2
- [express](https://npm.io/package/express.md) ^4.19.2
- [typescript](https://npm.io/package/typescript.md) ^5.2.2
- [@types/node](https://npm.io/package/@types/node.md) ^20.8.9
- [notion-to-md](https://npm.io/package/notion-to-md.md) ^3.1.1
- [@notionhq/client](https://npm.io/package/@notionhq/client.md) ^2.2.13
- [@marp-team/marp-core](https://npm.io/package/@marp-team/marp-core.md) ^3.9.0

## Recent versions

- 0.1.15 (latest) — 2025-01-25
- 0.1.14 — 2025-01-12
- 0.1.13 — 2024-12-15
- 0.1.12 — 2024-11-17
- 0.1.11 — 2024-11-13
- 0.1.10 — 2024-11-13
- 0.1.7 — 2024-10-02
- 0.1.5 — 2024-07-27
- 0.1.4 — 2023-11-05
- 0.1.3 — 2023-11-05
- 0.1.2 — 2023-11-05

## README

# notion-to-slides

A simple npm package to convert a Notion page to a Marp Slides presentation.

H1 and H2 Heading in the notion page will be used as the slide title, and the rest of the content will be used as the slide body.

You can see the usage from [getting started slides](https://speakerdeck.com/khiroyuki1993/notion-to-slides-convert-notion-page-to-presentation-slides), which is also created by this package. The original notion page is [here](https://khiroyuki1993.notion.site/notion-to-slides-451e4062f4644dbab60f4848cb35cb87).

## Demo Movie

https://github.com/user-attachments/assets/064ef684-e19f-4eae-95bf-e921f82015f5


## Usage

### 1. Prepare the notion token

1. Create an [integration token](https://www.notion.so/my-integrations) in Notion
1. Open the Notion page you want to convert
1. Add your integration to the page

### 2. Set the notion token to the environment variable

```bash
$ export NOTION_TOKEN=[your notion token]
```

### 3. Install and run the script

```bash
$ npx kromiii/notion-to-slides --url [your notion page url] --theme [marp theme] --port [port number]
```

You can change the theme by setting the `--theme` option. The default theme is `default`.

Available themes are: default, uncover, and gaia. See [Marp Core Themes](https://github.com/marp-team/marp-core/tree/main/themes) for more details.

### 4. Check and export the slides as pdf

Once the script is finished, it will open the browser with the slides. You can check the slides by clicking the "Print" button (cmd + P on Mac). Then you can export the slides as pdf.

## Example

```bash
$ npx kromiii/notion-to-slides --url https://www.notion.so/khiroyuki1993/CTOA-LT-4-c2769d7bc90a4f428adae7a2192d258a --theme uncover --port 8080
```

## Options

| Option | Description | Default | Required |
| --- | --- | --- | --- |
| `--url` | The Notion page URL to convert | | `required` |
| `--theme` | The Marp theme to use | `default` | `optional` |
 | `--port` | The port number to use | `8080` | `optional` | 

## Development

```bash
$ git clone git@github.com:kromiii/notion-to-slides.git
$ npm i
$ npm run start [your notion page url] -- --port [port number] -- --theme [marp theme]
```

## License

MIT

---
_Source: https://npm.io/package/@kromiii/notion-to-slides · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
