Skip to content

Commit

Permalink
chore(gatsby-source-contentful): Improve README on rich text ref (gat…
Browse files Browse the repository at this point in the history
…sbyjs#33401)

Co-authored-by: Lennart <lekoarts@gmail.com>
  • Loading branch information
2 people authored and wardpeet committed Oct 29, 2021
1 parent 9ba9d74 commit e2ecf78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/gatsby-source-contentful/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ query pageQuery($id: String!) {
raw
references {
... on ContentfulAsset {
# You'll need to query contentful_id in each reference
contentful_id
__typename
fixed(width: 1600) {
Expand Down Expand Up @@ -491,6 +492,8 @@ function BlogPostTemplate({ data }) {
}
```

**Note:** The `contentful_id` field must be queried on rich-text references in order for the `renderNode` to receive the correct data.

### Embedding an image in a Rich Text field

**Import**
Expand Down

0 comments on commit e2ecf78

Please sign in to comment.