{"id":18358310,"url":"https://github.com/kerwanp/notion-render","last_synced_at":"2025-04-09T22:19:13.259Z","repository":{"id":142680357,"uuid":"613885333","full_name":"kerwanp/notion-render","owner":"kerwanp","description":"A Javascript library to transform Notion API RichText object into HTML","archived":false,"fork":false,"pushed_at":"2023-12-30T22:25:32.000Z","size":27697,"stargazers_count":103,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-04-09T22:19:07.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://notion-render-docs.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kerwanp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-14T13:18:35.000Z","updated_at":"2025-03-07T15:06:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"98826a92-6a8a-4ed8-8926-b456f0c8b37f","html_url":"https://github.com/kerwanp/notion-render","commit_stats":null,"previous_names":["kerwanp/notion-renderer"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerwanp%2Fnotion-render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerwanp%2Fnotion-render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerwanp%2Fnotion-render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerwanp%2Fnotion-render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerwanp","download_url":"https://codeload.github.com/kerwanp/notion-render/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119353,"owners_count":21050771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T22:17:24.610Z","updated_at":"2025-04-09T22:19:13.211Z","avatar_url":"https://github.com/kerwanp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cbr/\u003e\n\n## Notion Render\n\n### Transform [Notion](https://notion.so) Rich Text into HTML, JSX and more.\n\n\u003cbr/\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-Are%20welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com) [![Commitizen friendly](https://img.shields.io/badge/Commitizen-Friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) [![License](https://img.shields.io/github/license/syneki/notion-cms?label=License\u0026style=flat-square)](LICENCE)\n\n[![@notion-render/client](https://img.shields.io/npm/v/@notion-render/client?label=%40notion-render%2Fclient\u0026style=flat-square)](https://www.npmjs.com/package/@notion-render/client)\n\n[🔨 Install](#🔨-install) • [🚀 Get started](#🚀-get-started) • [⚛ Renderers](#⚛-renderers) • [🎲 Blocks](#🎲-blocks) • [🔧 Extend](#🔧-extend)\n\n[Contribute](#contributing) • [License](#license)\n\n\u003c/div\u003e\n\n# ⚠ Pre-release\n\nThis project is currently in pre-release, you can use it but some features are lacking and core components are still able to change.\n\nDo not hesitate to open an issue to provide your feedback, report bugs and to propose new features.\n\n# 🔨 Install\n\n```shell\n$ npm install @notion-render/client\n$ yarn add @notion-render/client\n```\n\n# 🚀 Get started\n\n```typescript\nimport { Client } from '@notionhq/notion';\nimport { NotionRenderer } from '@notion-render/client';\n\nconst client = new Client({\n  auth: process.env.NOTION_TOKEN,\n});\n\nconst renderer = new NotionRenderer();\n\nconst { results } = await client.blocks.children.list({\n  block_id: '\u003cpage_id\u003e',\n});\n\nconst html = renderer.render(...results);\n```\n\n# ⚛ Renderers\n\n| Renderer | Status         |\n| -------- | -------------- |\n| HTML     | 🔶 In progress |\n| Markdown | ❌ Planned     |\n\n# 🎲 Blocks\n\n| Block Type | Supported | Notion client required | Available in | Notes |\n| --- | --- | --- | --- | --- |\n| Text | ✅ Yes |  | `@notion-render/client` | `\u003cspan\u003e` |\n| Bookmark | ✅ Yes |  | `@notion-render/client` | Uses `url-metadata` to generate bookmark |\n| Breadcrumb | ❌ Missing |  |  | Embedded preview of external URL |\n| Bulleted List Item | ✅ Yes |  | `@notion-render/client` | `\u003cul\u003e\u003cli\u003e` |\n| Callout | ✅ Yes |  | `@notion-render/client` | `\u003cblockquote\u003e` |\n| Child database | ❌ Missing |  |  |  |\n| Child page | ❌ Missing |  |  |  |\n| Code | ✅ Yes |  | `@notion-render/client` | \u003cpre\u003e\u003ccode\u003e |\n| Column List | ✅ Yes | ⚠ Yes | `@notion-render/client` | `\u003cdiv\u003e` |\n| Column | ✅ Yes | ⚠ Yes | `@notion-render/client` | `\u003cdiv\u003e` |\n| Divider | ✅ Yes |  | `@notion-render/client` | `\u003chr\u003e` |\n| Embed | ❌ Missing |  |  |  |\n| Equations | ❌ Missing |  |  |  |\n| Files | ❌ Missing |  |  |  |\n| Heading 1 | ✅ Yes |  | `@notion-render/client` | `\u003ch1\u003e` |\n| Heading 2 | ✅ Yes |  | `@notion-render/client` | `\u003ch2\u003e` |\n| Heading 3 | ✅ Yes |  | `@notion-render/client` | `\u003ch3\u003e` |\n| Toggle Heading 1 | ✅ Yes | ⚠ Yes | `@notion-render/client` | `\u003cdetails\u003e\u003csummary\u003e\u003ch1\u003e` Requires Notion client |\n| Toggle Heading 2 | ✅ Yes | ⚠ Yes | `@notion-render/client` | `\u003cdetails\u003e\u003csummary\u003e\u003ch2\u003e` Requires Notion client |\n| Toggle Heading 3 | ✅ Yes | ⚠ Yes | `@notion-render/client` | `\u003cdetails\u003e\u003csummary\u003e\u003ch3\u003e` Requires Notion client |\n| Image | ✅ Yes |  | `@notion-render/client` | `\u003cfig\u003e\u003cimg\u003e` |\n| Link preview | ❌ Missing |  |  |  |\n| Mention | ✅ Yes |  | `@notion-render/client` | `\u003cspan\u003e` Returns plain text (e.g. @John Doe) |\n| Numbered List Item | ✅ Yes |  | `@notion-render/client` | `\u003col\u003e\u003cli\u003e` |\n| Paragraph | ✅ Yes |  | `@notion-render/client` | `\u003cp\u003e` |\n| PDF | ❌ Missing |  |  |  |\n| Quote | ✅ Yes |  | `@notion-render/client` | `\u003cblockquote\u003e` |\n| Synced block | ❌ Missing |  |  |  |\n| Table | 🔶 Not fully supported |  | `@notion-render/client` | `\u003ctable\u003e` Header row and column not supported |\n| Table Row | 🔶 Not fully supported |  | `@notion-render/client` | `\u003ctr\u003e` Header row and column not supported |\n| Table of contents | ❌ Missing |  |  |  |\n| Template | ❌ Deprecated |  |  |  |\n| To do | ✅ Yes |  | `@notion-render/client` | `\u003cul\u003e\u003cli\u003e` |\n| Toggle | ✅ Yes | ⚠ Yes | `@notion-render/client` | `\u003cdetails\u003e` |\n| Video | ❌ Missing |  |  |  |\n\n# 🔧 Extend\n\n## Custom renderer\n\nYou can create custom renderers to handle custom Notion plugins and override existing blocks.\n\n```typescript\nimport { NotionRenderer, createBlockRenderer } from '@syneki/notion-render';\n\nconst paragraphRenderer = createBlockRenderer\u003cParagraphBlockObjectResponse\u003e(\n  'paragraph',\n  (data, renderer) =\u003e {\n    return `\u003cp\u003e${renderer.render(...data.paragraph.rich_text)}\u003c/p\u003e`;\n  }\n);\n\nconst renderer = new NotionRenderer({\n  renderers: [paragraphRenderer],\n});\n```\n\n# Contributing\n\nI'd love for you to contribute to this project. You can request new features by creating an issue, or submit a pull request with your contribution.\n\n# Licence\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\n```\nhttp://www.apache.org/licenses/LICENSE-2.0\n```\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerwanp%2Fnotion-render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerwanp%2Fnotion-render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerwanp%2Fnotion-render/lists"}