To create this REACT portfolio website called React-Portfolio
to implement my knowledge in React.js
.
Using react-bootstrap
as a library reference to find a preferred layout and components for my website.
Importantly, using GitHub gh-pages
to deploy React website on GitHub.
To create this React Portfolio Website. Please refer the following steps.
-
You need to create a repository on GitHub first and clone SSH key into your local storage in VS Code.
-
You need to run
npx create-react-app my-app
in the terminal to create a React project.
-
Note.1: You can rename
my-app
to your desired website name. -
Note.2: create-react-app uses
Babel
andwebpack
to optimize JavaScript applications to increase the overall efficiency.
-
You need to run
cd my-app
in the terminal. -
You need to run
npm start
in the terminal, this step will open a React Website for you that you just created. It will look like an empty page when you don't have anything yet. -
Run
npm install react-bootstrap bootstrap
to install react-bootstrap library in your package. So, you can useReact BootStrap
as a library.
These steps are very important!
- You need to add
"homepage": "https://myusername.github.io/my-app",
inside ofpackage.json
file.
- Note.1: Remember to edit
myusername
to your GitHub username. - Note.2: Remember to edit
my-app
to your React APP name.
- You need to run
npm install --save gh-pages
in the terminal to installgh-pages
and it will add following scripts in yourpackage.json
. It will look like below:
"scripts": { "predeploy": "npm run build", "deploy": "gh-pages -d build", "start": "react-scripts start", "build": "react-scripts build",
-
You need to run
npm run deploy
to deploy your website. -
Go to your GitHub Pages setting. Find the
Branch
under theBuild and deployment
. Selectgh-pages branch
for the deployed branch and keep/(root)
for the deployed folder. -
You are all set! The GitHub Page of your React website is creating for you, it might take a few minutes.
Click to watch
About Page
Resume Page
If you have any questions about this projects, please contact me!
Chao-Ying (Joyce) Chen