notion-content-render
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9132
18
14