Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

notion-content-render

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-content-render - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

13

package.json
{
"name": "notion-content-render",
"version": "0.1.3",
"version": "0.1.4",
"description": "A library to render notion content structure to React or MD",

@@ -15,13 +15,22 @@ "main": "dist/index.js",

"test": "jest",
"clean": "rm -rf dist"
"test:watch": "jest --watch",
"clean": "rm -rf dist",
"fixture": "ts-node -T fixtures/dump_test_fixture.ts"
},
"devDependencies": {
"@notionhq/client": "^0.2.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@types/jest": "^26.0.23",
"@types/node": "^15.12.5",
"@types/react": "^17.0.11",
"dotenv": "^10.0.0",
"esbuild": "^0.12.9",
"jest": "^27.0.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
"typescript": "^4.3.4"
}
}

@@ -1,1 +0,18 @@

# notion-content-render
## **notion-content-render**
This is a simple walker through Notion block content structure and let you build the renderer
I created a sample of Markdown renderer and React renderer where you can freely style your component from Notion content. The exposed API matches with what Notion has provided via their official API
**Example**
```
const render = makeRenderer(mdStyleFactory);
...
render(<notion heading 1 block>) ==> '# <Notion heading one block>
```
## **References**
- [React simple renderer](src/react.style.tsx)
- [Markdown simple renderer](src/md.style.tsx)
- [Notion block content reference](https://developers.notion.com/reference/block)
- [Test suite content](https://www.notion.so/silenteer/Notion-supported-block-test-page-0185884dda90435bb1196daf5788cf05)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc