0.0.11 • Published 5 years ago
notionast-util-to-html v0.0.11
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
- Block Color
- Column & Column List
- Responsive : Wrap into one column per row when viewport width < 680px
Basic Blocks
- Text
- Color & Background
- Style : Bold, Italic, Strike, Code, Link
- Nested
- Embeded Sub-page
- Heading 1, 2, 3
- Bulleted List
- Numbered List
- Toggle List
- Quote
- Divider
- 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
- Image
- Web Bookmark
- Video
- Audio
- Code
- File
Advanced Blocks
- Table of Contents
- Math Equation
- Template Button (This seems to be useless when rendered)
- Breadcrumb