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: docs/tutorials/contentful-and-the-starter-template.md
+8-7
Original file line number
Diff line number
Diff line change
@@ -79,11 +79,12 @@ You will be directed to the `Homepage` entry editor, where you will see the stru
79
79
80
80
From the `Top section (optional)` field, click on the first `💎 Hero banner component` entry reference to edit it:
81
81
82
-
1. Edit the `Headline` and/or `Body text` fields.
83
-
2. Publish the changes by clicking on the `Publish changes` button in the right entry sidebar.
84
-
3. Open the preview to see the changes, by clicking on the `Open preview` button in the right entry sidebar.
82
+
1. Edit the `Headline` and/or `Body text` fields, the changes are saved automatically.
83
+
2. Return to the `Homepage` entry editor, by clicking on the left-pointing chevron.
84
+
3. From the `Homepage` entry editor, open the preview to see the changes, by clicking on the `Open preview` button in the right entry sidebar.
85
+
4. You should see the changes, they are only visible to you until you decide to publish them, this is made possible thanks to the preview mode.
85
86
86
-
NOTE: you can also see the changes by running the Starter Template application locally, after completing the [setup](../../README.md/#getting-started).
87
+
NOTE: you can also see the changes by running the Starter Template application locally, after completing the [setup](../../README.md/#getting-started). You will have to publish the changes, as the preview mode is only available from Contentful.
87
88
88
89
---
89
90
@@ -129,12 +130,12 @@ The new field is now available, let's add a value in the `Homepage` entry:
129
130
130
131
Now, let's connect the new `Greeting` field to our Starter Template source code:
131
132
132
-
- In your terminal of choice, run `yarn run graphql-codegen:generate`, this script will sync the Starter Template's source code with the web app content models, and generate the necessary updated typings files.
133
+
- In your terminal of choice, run `yarn run graphql-codegen:watch`, this script will sync the Starter Template's source code with the web app content models, and generate the necessary updated typings files, as soon as a change is made in a `.graphql` file.
133
134
- In our case, it will update the typings of our `💎 Hero banner component` content type, to make the `Greeting` field available.
134
135
- Open the `ctf-hero-banner.graphql` file, this file represents the query made to Contentful to get the `💎 Hero banner component` content type fields values
135
-
- Follow the comment in the file, line #7.
136
+
- Follow the comment in the file, line #7, save the changes.
136
137
- Open the `ctf-hero-banner.tsx` file, this file represents the `💎 Hero banner component` content type.
137
-
- Follow the comments in the file, lines #99 and #142.
138
+
- Follow the comments in the file, lines #99 and #142, save the changes.
138
139
- Navigate to the running Starter Template application, [http://localhost:3000/](http://localhost:3000/)
139
140
- If the application is not running yet, in your terminal of choice, run `yarn dev`.
140
141
- You should see the `Greeting` field in the Homepage - Hero section.
0 commit comments