Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thank you and some clarifications #85

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you follow along with this tutorial, you'll end up with a new React app—hos
3. Fill in the form as follows:
- **Repository name:** You can enter any name you want\*.

> \* For a [project site](https://pages.github.com/#project-site), you can enter any name you want. For a [user site](https://pages.github.com/#user-site), GitHub [requires](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites) that the repository's name have the following format: `{username}.github.io` (e.g. `gitname.github.io`)
> \* For a [project site](https://pages.github.com/#project-site), you can enter any name you want. For a [user site](https://pages.github.com/#user-site), GitHub [requires](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites) that the repository's name have the following format: `{username}.github.io` (e.g. `gitname.github.io`). For an explanation of the difference between a project site and a user site, please see [Types of Github Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites).

> The name you enter will show up in a few places: (a) in references to the repository throughout GitHub, (b) in the URL of the repository, and (c) in the URL of the deployed React app.

Expand Down Expand Up @@ -122,7 +122,7 @@ At this point, the `gh-pages` npm package is installed on your computer and the
+ "homepage": "https://gitname.github.io/react-gh-pages",
"private": true,
```
At this point, the React app's `package.json` file includes a property named `homepage`.
At this point, the React app's `package.json` file includes a property named `homepage`. Note: the "+" sign is a common syntax for showing what has been added in commit histories. It's used in this example to show that ```"homepage": "https://gitname.github.io/react-gh-pages"``` is being added. Do not, however, actually add the "+" into your package.json file.

### 5. Add deployment scripts to the `package.json` file

Expand All @@ -142,7 +142,9 @@ At this point, the React app's `package.json` file includes a property named `ho
"build": "react-scripts build",
```

> \* For a [project site](https://pages.github.com/#project-site), that's the `deploy` script. For a [user site](https://pages.github.com/#user-site), the `deploy` script is: `gh-pages -b master -d build`. You can read more about the `deploy` script in the ["GitHub Pages" section](https://create-react-app.dev/docs/deployment/#github-pages) of the `create-react-app` documentation.
> \* For a [project site](https://pages.github.com/#project-site), that's the `deploy` script.
>
> For a [user site](https://pages.github.com/#user-site), the `deploy` script is: `gh-pages -b master -d build`. You can read more about the `deploy` script in the ["GitHub Pages" section](https://create-react-app.dev/docs/deployment/#github-pages) of the `create-react-app` documentation.

At this point, the React app's `package.json` file includes deployment scripts.

Expand All @@ -168,6 +170,8 @@ At this point, the React app's `package.json` file includes deployment scripts.

At this point, the local repository has a "remote" whose URL points to the GitHub repository you created in Step 1.

If you're having trouble finding what the repositories name is, you can click on the "Settings" tab on the upper part of the page, then click on "Pages" menu on the left-hand side and a page with the words "Your site is published at ```https://username.github.io/project-name/``` " will be displayed. You can copy and paste that name, just be sure to remove the "/" at the end. ![Where to Find Project Name](https://github.com/trrapp12/react-gh-pages/blob/master/screenshot-github.com-2022.02.22-06_58_50.png).

### 7. Deploy the React app to GitHub Pages

1. Deploy the React app to GitHub Pages
Expand Down Expand Up @@ -229,4 +233,4 @@ Thanks to these people for contributing to the maintenance of this tutorial.
[![adnjoo](https://github.com/adnjoo.png?size=40)](https://github.com/adnjoo)
[![thebeatlesphan](https://github.com/thebeatlesphan.png?size=40)](https://github.com/thebeatlesphan)

This list is maintained manually—for now—and includes (a) each person who submitted a pull request that was eventually merged into `master`, and (b) each person who contributed in a different way (e.g. providing constructive feedback) and who approved of me including them in this list.
This list is maintained manually—for now—and includes (a) each person who submitted a pull request that was eventually merged into `master`, and (b) each person who contributed in a different way (e.g. providing constructive feedback) and who approved of me including them in this list.
Binary file added screenshot-github.com-2022.02.22-06_58_50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.