README.md
January 28, 2026 ยท View on GitHub

Render your Notion content through your Angular application as a CMS. Possible uses:
- ๐ก Write your blog
- ๐ Showcase your projects
- ๐ Write documentation
Huge thanks to react-notion, this library simulates much of what they have previously created with React. โค๏ธ
This package handles communication with the Notion API internally by using notion-api-worker Consumers do not need to interact with the Notion API directly.
Created by Borja Muรฑoz with the help of all contributors
Table of Contents
Type of content
You can display any content you want and configure your style to your liking. But we offer you these two options by default:
- Post: which allows you to use all the potential of Notion to write your best articles.
- Project: to showcase your projects in an attractive visual format.
For both, only the styles change, the components are the same:
- Notion databases: display multiple items
- Notion pages: display the content in blocks for each item.
Get started
npm install ngx-notion-cms
Import the providers in your app.config.ts
import { globalSettingsProvider } from 'ngx-notion-cms';
import { provideHttpClient } from '@angular/common/http';
export const appConfig: ApplicationConfig = {
providers: [
provideHttpClient(),
globalSettingsProvider({}), //you can pass global settings here,
],
};
If you want to use the default Tailwind classes you must import this in your styles.css
@import 'ngx-notion-cms/styles';
Code Highlight
If you are going to use code blocks ``ngx-notion-cmsusesngx-hightlightsjs` under the hood. Here is the configuration:
npm install ngx-highlightjs
import { globalSettingsProvider } from 'ngx-notion-cms';
import { provideHttpClient } from '@angular/common/http';
import { provideHighlightOptions } from 'ngx-highlightjs';
export const appConfig: ApplicationConfig = {
providers: [
provideHttpClient(),
globalSettingsProvider({}), //you can pass global settings here,
provideHighlightOptions({
fullLibraryLoader: () => import('highlight.js'),
lineNumbersLoader: () => import('ngx-highlightjs/line-numbers'),
}),
],
};
Example
Add database component
Add page component
Global Options
By default, global options are configured that are easily modified. For example, in case we want the images of the articles in the databases to not be displayed:
import { globalSettingsProvider } from 'ngx-notion-cms';
export const appConfig: ApplicationConfig = {
providers: [
// ....
globalSettingsProvider({
cacheOptions: {
stateTime: 100000,
storeInCache: true,
},
database: {
showImage: false,
},
page: {
showTableOfContents: true,
},
}),
],
};
Supported Blocks
Most common block types are supported. We happily accept pull requests to add support for the missing blocks.
| Block Type | Supported | Notes |
|---|---|---|
| Table Of Contents | โ Yes | |
| Text | โ Yes | |
| Heading | โ Yes | |
| Image | โ Yes | |
| Image Caption | โ Missing | |
| Bulleted List | โ Yes | |
| Numbered List | โ Yes | |
| Quote | โ Yes | |
| Callout | โ Yes | |
| Column | โ Yes | |
| iframe | โ Yes | |
| Video | โ Yes | Only embedded videos |
| Divider | โ Yes | |
| Link | โ Yes | |
| Code | โ Yes | |
| Web Bookmark | โ Yes | |
| Toggle List | โ Missing | |
| Page Links | โ Yes | |
| Header | โ Missing | |
| Databases | โ Missing | |
| Checkbox | โ Missing |