0.12.1 • Published 5 months ago

@notion-md-converter/zenn v0.12.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@notion-md-converter/zenn

NotionページをZennのMarkdownに変換するためのパッケージです。

🚀 インストール

# JavaScriptの場合
npm install @notion-md-converter/core @notion-md-converter/zenn

# TypeScriptの場合
npm install @notion-md-converter/core @notion-md-converter/zenn @notion-md-converter/types

📖 使い方

import { $getPageFullContent } from "@notion-md-converter/core";
import { NotionZennMarkdownConverter } from "@notion-md-converter/zenn";
import { Client } from "@notionhq/client";

const client = new Client({
  auth: API_KEY,
});

const pageId = "some-page-id";
// このライブラリのNotion APIヘルパー
// Notion Blockの子要素を再帰的に取得
const content = await $getPageFullContent(client, pageId);

// Markdownに変換
const executor = new NotionZennMarkdownConverter();
const result = executor.execute(content);

ブロックオプション

コールアウト

背景色とテキスト色の設定に基づいて、Zennメッセージのinfo、warn、alertスタイルを選択できます。

ノート
redalert
その他default

コード

コールアウトメタデータを使用してdiff表示を有効にできます

メタデータ
difftrueに設定するとdiff表示が有効になります

画像

メタデータを設定して画像のサイズを調整できます。

メタデータ
width画像の幅を指定します(例:500

埋め込み

Speaker Deck

メタデータ
idSpeaker Deck ID

IDが指定されていない場合は、リンクカードとして表示されます。

ビデオ

YouTube動画は埋め込みとして表示されます。その他の動画はvideoタグを使用します。

ライセンス

MITライセンスの下で配布されています。詳細はLICENSEをご覧ください。

作者

malvageee (https://github.com/salvage0707)

0.12.1

5 months ago

0.12.0

5 months ago

0.11.0

5 months ago

0.10.0

5 months ago

0.9.0

7 months ago

0.8.0

7 months ago

0.7.4

7 months ago

0.7.3

7 months ago

0.7.2

8 months ago

0.7.1

8 months ago

0.6.3

8 months ago

0.6.2

8 months ago

0.6.1

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.1

8 months ago

0.4.0

8 months ago

0.3.1

8 months ago

0.3.0

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago