Skip to content

Commit ddceb4b

Browse files
committed
Fix URL + Text styling improvement
1 parent df1d3e5 commit ddceb4b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ _This packages doesn't handle the communication with the API. Check out [notion-
1111

1212
⚡️ **Fast** – Up to 10x faster than Notion\*
1313

14-
🎯 **Precise** – Results are _almost_ identical
14+
🎯 **Accurate** – Results are _almost_ identical
1515

1616
🔮 **Code Highlighting** – Automatic code highlighting with [prismjs](https://prismjs.com/)
1717

1818
🎨 **Custom Styles** – Styles are easily adaptable. Optional styles included
1919

20-
_\* First Meaningful Paint compared to a [hosted example](http://react-notion-example.now.sh/) on [Vercel](https://vercel.cm)._
20+
_\* First Meaningful Paint compared to a [hosted example](http://react-notion-example.now.sh/) on [Vercel](https://vercel.com)._
2121

2222
## Install
2323

@@ -33,7 +33,7 @@ We can store the API response in a `.json` file and import it.
3333

3434
```js
3535
import "react-notion/src/styles.css";
36-
import "prismjs/themes/prism-tomorrow.css"; // only needed if you use Code Blocks
36+
import "prismjs/themes/prism-tomorrow.css"; // only needed for code highlighting
3737
import { NotionRenderer } from "react-notion";
3838

3939
import response from "./load-page-chunk-response.json"; // https://www.notion.so/api/v3/loadPageChunk
@@ -51,23 +51,19 @@ A working example can be found inside the `example` directory.
5151

5252
### Next.js Example
5353

54-
In this example we use [Next.js](https://github.com/zeit/next.js) for SSG. We use [notionapi-agent](https://github.com/dragonman225/notionapi-agent) to fetch data from the API.
55-
56-
To get your `pageId`, inspect network requests while visiting a public Notion page. It is included in the body of the `POST /api/v3/loadPageChunk` request.
54+
In this example we use [Next.js](https://github.com/zeit/next.js) for SSG. We use [notion-api-worker](https://github.com/splitbee/notion-api-worker) to fetch data from the API.
5755

5856
`/pages/my-post.jsx`
5957

6058
```js
6159
import "react-notion/src/styles.css";
6260
import "prismjs/themes/prism-tomorrow.css";
63-
import { NotionRenderer } from "react-notion";
64-
import { createAgent } from "notionapi-agent";
6561

66-
const agent = createAgent();
62+
import { NotionRenderer } from "react-notion";
6763

6864
export async function getStaticProps() {
6965
const data = await fetch(
70-
"https://notion-api.splitbee.io/v1/page/2e22de6b770e4166be301490f6ffd420"
66+
"https://notion-api.splitbee.io/v1/page/<NOTION_PAGE_ID>"
7167
).then(res => res.json());
7268

7369
return {

0 commit comments

Comments
 (0)