Skip to content

Commit d482fc7

Browse files
committed
Improve example in README
1 parent 582a7a3 commit d482fc7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![react-notion](https://user-images.githubusercontent.com/1440854/79684011-6c948280-822e-11ea-9e23-1644903796fb.png)
22

3-
An (unofficial) React renderer for Notion pages. It is written in TypeScript. Use it for blogs, documentations or personal sites, while we wait for the official API.
3+
A renderer for Notion pages. It is written in TypeScript. Use Notion as CMS for your blog, documentation or personal site, while we wait for the official API.
44

55
This packages does not include an API wrapper. You can find some interesting projects here: [notionapi-agent](https://github.com/dragonman225/notionapi-agent)
66

@@ -18,6 +18,10 @@ import "react-notion/src/styles.css";
1818

1919
import "prismjs/themes/prism-tomorrow.css"; // only needed if you use Code Blocks
2020

21+
// Load Notion Data from JSON file. Can be replaced with API call.
22+
import response from "./load-page-chunk-response.json";
23+
const blockMap = response.recordMap.block;
24+
2125
export default () => (
2226
<div style={{ maxWidth: 768 }}>
2327
<NotionRenderer blockMap={blockMap} />
@@ -42,16 +46,18 @@ A working example, built with Next.js, can be found inside the `example` directo
4246
- [x] Divider
4347
- [x] Callout
4448
- [x] Image Captions
49+
- [x] Code Blocks
4550

4651
Missing
4752

4853
- [ ] Checkboxes
4954
- [ ] Toggle Lists
55+
- [ ] Tables
5056

5157
## Sites using react-notion
5258

53-
* [PS Tunnel](https://pstunnel.com/blog)
54-
* [Splitbee](https://splitbee.io/blog)
59+
- [PS Tunnel](https://pstunnel.com/blog)
60+
- [Splitbee](https://splitbee.io/blog)
5561

5662
## Credits
5763

0 commit comments

Comments
 (0)