@@ -106,7 +106,8 @@ To override this, specify the `homepage` in your `package.json`, for example:
106
106
This will let Create React App correctly infer the root path to use in the generated HTML file.
107
107
108
108
** Note** : If you are using ` react-router@^4 ` , you can root ` <Link> ` s using the ` basename ` prop on any ` <Router> ` .<br >
109
- More information [ here] ( https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string ) .<br >
109
+ More information [ here] ( https://reacttraining.com/react-router/web/api/BrowserRouter/basename-string ) .<br >
110
+
110
111
<br >
111
112
For example:
112
113
@@ -240,7 +241,8 @@ For more information see [Firebase Hosting](https://firebase.google.com/docs/hos
240
241
241
242
### Step 1: Add `homepage` to `package.json`
242
243
243
- **The step below is important!**<br>
244
+ **The step below is important!**<br>
245
+
244
246
**If you skip it, your app will not deploy correctly.**
245
247
246
248
Open your `package.json` and add a `homepage` field for your project:
@@ -291,11 +293,10 @@ Add the following scripts in your `package.json`:
291
293
292
294
The `predeploy` script will run automatically before `deploy` is run.
293
295
294
- If you are deploying to a GitHub user page instead of a project page you' ll need to make two
295
- additional modifications :
296
+ If you are deploying to a GitHub user page instead of a project page you' ll need to make one
297
+ additional modification :
296
298
297
- 1. First, change your repository' s source branch to be any branch other than **master**.
298
- 1. Additionally, tweak your `package.json` scripts to push deployments to **master**:
299
+ 1. Tweak your ` package.json` scripts to push deployments to ** master** :
299
300
300
301
` ` ` diff
301
302
" scripts" : {
@@ -312,7 +313,7 @@ Then run:
312
313
npm run deploy
313
314
` ` `
314
315
315
- ### Step 4: Ensure your project’s settings use `gh-pages`
316
+ # ## Step 4: For a project page, ensure your project’s settings use `gh-pages`
316
317
317
318
Finally, make sure ** GitHub Pages** option in your GitHub project settings is set to use the ` gh-pages` branch:
318
319
0 commit comments