docs: updated contentful documentation (#3800)
This commit is contained in:
@@ -147,31 +147,16 @@ This runs the Contentful migration in that file and makes the necessary changes
|
||||
|
||||
To check if the above migration worked, in your Contentful Space dashboard go to Content Models from the navigation bar. You should see the new content model Rich Text.
|
||||
|
||||

|
||||
The above migration also allows you to add Rich Text content to pages. To test this out:
|
||||
|
||||
The above migration also allows you to add Rich Text content to pages. To test this out, go to Content from the navigation bar and choose Page in the select field next to the search bar. This shows the available pages in your Contentful Space.
|
||||
|
||||

|
||||
|
||||
Choose one of the pages. For example, the About page. Then, scroll down to the Add content button. If you click on it, you should be able to choose Rich Text under New Content.
|
||||
|
||||

|
||||
|
||||
Click on Rich Text and a new form will open to create new Rich Text content. It has the same fields that you defined in the migration file.
|
||||
|
||||

|
||||
|
||||
After adding the content you want, click on the Publish button on the right then go back to the About page editor.
|
||||
|
||||

|
||||
|
||||
Similarly, in the About page editor, click on the Publish Changes button on the right to view these changes later in the storefront.
|
||||
|
||||

|
||||
|
||||
Similarly, you can add Rich Text content to any product page.
|
||||
|
||||

|
||||
1. Go to Content from the navigation bar.
|
||||
2. Choose Page in the select field next to the search bar. This shows the available pages in your Contentful Space.
|
||||
3. Choose one of the pages. For example, the About page.
|
||||
4. Scroll down to the Add content button. If you click on it, you should be able to choose Rich Text under New Content.
|
||||
5. Click on Rich Text and a new form will open to create new Rich Text content. It has the same fields that you defined in the migration file.
|
||||
6. After adding the content you want, click on the Publish button on the right then go back to the About page editor.
|
||||
7. Similarly, in the About page editor, click on the Publish Changes button on the right to view these changes later in the storefront.
|
||||
8. Similarly, you can add Rich Text content to any product page.
|
||||
|
||||
---
|
||||
|
||||
@@ -259,20 +244,18 @@ export const query = graphql`
|
||||
|
||||
To test this out, run your Medusa backend by running this command in its directory:
|
||||
|
||||
```bash
|
||||
```bash npm2yarn
|
||||
npm run start
|
||||
```
|
||||
|
||||
Then run the Gatsby storefront by running this command in its directory:
|
||||
|
||||
```bash
|
||||
```bash npm2yarn
|
||||
npm run start
|
||||
```
|
||||
|
||||
This runs the Gatsby storefront on `localhost:8000`. Go to the storefront in your browser and open the About page. You should see the Rich Text content you added.
|
||||
|
||||

|
||||
|
||||
### Render Component in a Product Page
|
||||
|
||||
In the example migration, you also edited the product page to include a new Content Modules field that allows inserting Rich Text content.
|
||||
@@ -339,8 +322,6 @@ This loops over `contentModules` and if the type of the content is Rich Text, it
|
||||
|
||||
Restart the Gatsby storefront then open a product that you added Rich Text content to. You should see the Rich Text component at the end of the page.
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## See Also
|
||||
|
||||
Reference in New Issue
Block a user