0.10.1 • Published 9 months ago

@noticle/qiita v0.10.1

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

@noticle/qiita

Qiita package for converting Notion pages to Markdown.

🚀 Installation

# if JavaScript
npm install @noticle/core @noticle/qiita

# if TypeScript
npm install @noticle/core @noticle/qiita @noticle/types

📖 Usage

import { $getPageFullContent } from "@noticle/core";
import { NotionQiitaMarkdownConverter } from "@noticle/qiita";
import { Client } from "@notionhq/client";

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

const pageId = "some-page-id";
// Notion API helpers in this library.
// Recursively retrieve the Notion Block's child elements
const content = await $getPageFullContent(client, pageId);

// convert to markdwon
const executor = new NotionQiitaMarkdownConverter();
const result = executor.execute(content);

Block Options

Callout

You can choose between Qiita note's info, warn, and alert styles based on the background color and text color settings.

colornote
yellowwarn
redalert
otherinfo

Code

You can enable diff display using Callout Metadata

metadatavalue
diffSet to true to enable diff display

Embed

CodePen

metadatavalue
heightiframe height
defaultTabdefault tab

Figma

metadatavalue
heightiframe height
widthiframe width

Google Slide

metadatavalue
heightiframe height
widthiframe width

YouTube

metadatavalue
heightiframe height
widthiframe width

Speaker Deck

metadatavalue
idSpeaker Deck ID

If no ID is specified, it will be displayed as a link card.

Video

YouTube videos will be displayed as embeds. Other videos will use the video tag.

License

Distributed under the MIT License. See LICENSE for more information.

Author

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

0.10.1

9 months ago

0.10.0

9 months ago

0.9.0

9 months ago