This package has been deprecated

Author message:

WARNING: This project has been renamed to nast-util-to-html. Install using nast-util-to-html instead.

notionast-util-to-html

0.0.11 • Public • Published

notionast-util-to-html

Render HTML from NotionAST.

This module takes the output of notionast-util-from-notionapi (v0.2.0) as input and generate HTML.

Here is a demo page. Also you can take a look at test/test.html for the generated HTML.

Usage

A great starting point is reading test/lib.spec.js, my test script which is less than 50 lines (core code only 5 lines, most of others are just HTML that wrap the generated content).

Supported Blocks

Fundamental

  • [x] Block Color
  • [x] Column & Column List
    • [x] Responsive : Wrap into one column per row when viewport width < 680px

Basic Blocks

  • [x] Text
    • [x] Color & Background
    • [x] Style : Bold, Italic, Strike, Code, Link
    • [x] Nested
  • [ ] Embeded Sub-page
  • [x] Heading 1, 2, 3
  • [x] Bulleted List
  • [x] Numbered List
  • [x] Toggle List
  • [x] Quote
  • [x] Divider
  • [x] Callout

Inline

  • [ ] Mention a Person (Directly renders id of the user)
  • [ ] Mention a Page (Directly renders id of the page)
  • [ ] Date or Reminder (Directly renders raw data)

Database

Not yet supported

Media

  • [x] Image
  • [x] Web Bookmark
  • [x] Video
  • [ ] Audio
  • [x] Code
  • [ ] File

Advanced Blocks

  • [ ] Table of Contents
  • [ ] Math Equation
  • [ ] Template Button (This seems to be useless when rendered)
  • [ ] Breadcrumb

Readme

Keywords

Package Sidebar

Install

npm i notionast-util-to-html

Weekly Downloads

5

Version

0.0.11

License

MIT

Unpacked Size

206 kB

Total Files

25

Last publish

Collaborators

  • dragonman225