0.12.1 • Published 5 months ago

@notion-md-converter/qiita v0.12.1

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

@notion-md-converter/qiita

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

🚀 インストール

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

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

📖 使い方

import { $getPageFullContent } from "@notion-md-converter/core";
import { NotionQiitaMarkdownConverter } from "@notion-md-converter/qiita";
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 NotionQiitaMarkdownConverter();
const result = executor.execute(content);

ブロックオプション

コールアウト

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

note
yellowwarn
redalert
その他info

コード

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

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

埋め込み

CodePen

メタデータ
heightiframeの高さ
defaultTabデフォルトタブ

Figma

メタデータ
heightiframeの高さ
widthiframeの幅

Google Slide

メタデータ
heightiframeの高さ
widthiframeの幅

YouTube

メタデータ
heightiframeの高さ
widthiframeの幅

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