Skip to content

Commit 0643b52

Browse files
committed
doc: update README to reflect the recent changes
1 parent 37109ea commit 0643b52

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
</div>
2020

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?
2222

2323
**gatsby-source-notion** is a solution for you manage the content of your Gatsby site without any
2424

@@ -27,7 +27,8 @@ Tired of uploading a markdown file to your GitHub for every new blog post? Havin
2727
- 👉 Allow you to build a website with content from your Notion databases or pages
2828
- 💈 Page contents in markdown!
2929
- ⌨️ 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
3132
- 🍻 Support for `remark` and `mdx`
3233
- 👀 Near real-time preview in development mode
3334

@@ -112,7 +113,7 @@ Here is an example in TypeScript. A JS implementation would follow the same logi
112113

113114
```ts
114115
/* gatsby-node */
115-
import type { GatsbyNode } from 'gatsbby';
116+
import type { GatsbyNode } from 'gatsby';
116117

117118
// types generated from a code generator such as `gatsby-plugin-graphql-codegen`
118119
import type { BlogsQuery } from '@graphql';
@@ -253,7 +254,7 @@ Don't worry though, because it’s only a matter of time before you see the chan
253254
As this plugin relies on the the official Notion API which is still in beta, we share the same limitations as the API.
254255

255256
- 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.
257258
- 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).
258259
Currently, there is no way we can get data beyond that.
259260
- 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
281282
![alt text](path-to-image)
282283
```
283284

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+
284295
# FAQ
285296

286297
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
294305
You can create a page property (for example, a publish double checkbox) and use this information in your page creation process.
295306
If you're in the development mode with preview enabled, you should be able to see the removal in near real-time.
296307

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+
297312
# About
298313

299314
This source plugin is built on the official Notion API.

0 commit comments

Comments
 (0)