You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-4Lines changed: 19 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@
18
18
19
19
</div>
20
20
21
-
Tired of uploading a markdown file to your GitHub for every new blog post? Having colleagues who don't know how to git commit? or simply you don't want to integrate with another CMS?
21
+
Tired of committing markdown files to your git repo for every new blog post? Having colleagues who don't know how to git commit? or simply you don't want to introduce an additional toolset (CMS) to manage the content of your website?
22
22
23
23
**gatsby-source-notion** is a solution for you manage the content of your Gatsby site without any
24
24
@@ -27,7 +27,8 @@ Tired of uploading a markdown file to your GitHub for every new blog post? Havin
27
27
- 👉 Allow you to build a website with content from your Notion databases or pages
28
28
- 💈 Page contents in markdown!
29
29
- ⌨️ Title and their properties in plain text accessible via the front matter
30
-
- 🔮 All raw properties accessible via GraphQL
30
+
- 🖼️ URL for cover image and icon!
31
+
- 🔮 All page properties accessible via GraphQL
31
32
- 🍻 Support for `remark` and `mdx`
32
33
- 👀 Near real-time preview in development mode
33
34
@@ -112,7 +113,7 @@ Here is an example in TypeScript. A JS implementation would follow the same logi
112
113
113
114
```ts
114
115
/* gatsby-node */
115
-
importtype { GatsbyNode } from'gatsbby';
116
+
importtype { GatsbyNode } from'gatsby';
116
117
117
118
// types generated from a code generator such as `gatsby-plugin-graphql-codegen`
118
119
importtype { BlogsQuery } from'@graphql';
@@ -253,7 +254,7 @@ Don't worry though, because it’s only a matter of time before you see the chan
253
254
As this plugin relies on the the official Notion API which is still in beta, we share the same limitations as the API.
254
255
255
256
- Currently, only text-based blocks can be extracted via this API.
256
-
i.e. Items such as embedded pdfs are not supported.
257
+
i.e. Items such as embedded PDFs are not supported.
257
258
- If you have a very long or sizing page, be aware that [the official Notion API has a limit of maximum size of 1000 block elements and 500kb](https://developers.notion.com/reference/errors#size-limits).
258
259
Currently, there is no way we can get data beyond that.
259
260
- Indentation is only supported for lists such as bullets, numbers and to-do lists.
@@ -281,6 +282,16 @@ You just need to embed them using the normal markdown syntax as part of your par
281
282

282
283
```
283
284
285
+
# Cover & Icon
286
+
287
+
Now, cover image and icon are accessible as part of pages' metadata.
288
+
289
+
For cover image, the URL for it is exported via `coverImage`.
290
+
For Icon, if it is an image, its URL will be supplied in `iconImage`;
291
+
if it is an emoji, its value will be supplied in `iconEmoji`.
292
+
293
+
They can also be found within the frontmatter of the MDX export.
294
+
284
295
# FAQ
285
296
286
297
1. How can I specify different databases and pages for different environments, such as those used by staging, or production?
@@ -294,6 +305,10 @@ You just need to embed them using the normal markdown syntax as part of your par
294
305
You can create a page property (for example, a publish double checkbox) and use this information in your page creation process.
295
306
If you're in the development mode with preview enabled, you should be able to see the removal in near real-time.
296
307
308
+
4. Since the introduction of access capabilities in Notion API in Dec 2021,
309
+
some content may be unexpectedly missing from the return due to access control granted to the API client.
310
+
Make sure the API client has `read` permission to all of the content you want to output.
311
+
297
312
# About
298
313
299
314
This source plugin is built on the official Notion API.
0 commit comments