Skip to content

Commit 641a337

Browse files
docs: [] update guidance (#130)
2 parents 6402779 + 77309b6 commit 641a337

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

docs/tutorials/contentful-and-the-starter-template.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ You will be directed to the `Homepage` entry editor, where you will see the stru
7979

8080
From the `Top section (optional)` field, click on the first `💎 Hero banner component` entry reference to edit it:
8181

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.
8586

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.
8788

8889
---
8990

@@ -129,12 +130,12 @@ The new field is now available, let's add a value in the `Homepage` entry:
129130

130131
Now, let's connect the new `Greeting` field to our Starter Template source code:
131132

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.
133134
- In our case, it will update the typings of our `💎 Hero banner component` content type, to make the `Greeting` field available.
134135
- 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.
136137
- 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.
138139
- Navigate to the running Starter Template application, [http://localhost:3000/](http://localhost:3000/)
139140
- If the application is not running yet, in your terminal of choice, run `yarn dev`.
140141
- You should see the `Greeting` field in the Homepage - Hero section.

src/components/features/ctf-components/ctf-hero-banner/ctf-hero-banner.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const CtfHeroBanner = (props: HeroBannerFieldsFragment) => {
9999
imageStyle: imageStyleBoolean,
100100
headline,
101101
// Tutorial: uncomment the line below to make the Greeting field available to render
102-
// greeting
102+
// greeting,
103103
bodyText,
104104
ctaText,
105105
targetPage,

0 commit comments

Comments
 (0)