simran-arora / simran-arora.github.io

personal website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

simran-arora.github.io

personal website

Edit Github page (future times)

npm start to open up the localhost view.

Create a Github repo (first time)

  1. The repo should be public and named <your_github_id>.github.io

Setting up the react app:

  1. npm install create-react-app
  2. npx create-react-app <your_github_id>.github.io
  3. cd <your_github_id>.github.io
  4. npm start // just to check it out, make sure yarn and npm aren't being used at the same time!
  • npm i --save @fortawesome/free-solid-svg-icons
  • npm i --save @fortawesome/fontawesome-svg-core
  • npm i --save @fortawesome/react-fontawesome
  1. edit package.json (e.g. "vim package.json")
    • add "homepage": "https://<your_github_id>.github.io
    • add "predeploy":
    • add "deploy": "gh-pages -d build -b master"
  2. npm run build // creates a build folder
    • copy the contents in the build folder and paste into the /<your_github_id>.github.io/ folder
  3. npm install gh-pages --save-dev
  4. push to github, setup as follows:
  5. move your repo to a second branch (e.g. name this "code", or "dev")
    • git checkout -b dev
    • git push -u origin dev
  6. go to the github repo --> enter settings --> enter branches --> set "dev" as default branch
  7. deploy your site: npm run deploy

If you're using yarn instead of npm, replace the commands:

  • npm run build --> yarn build
  • npm run deploy --> yarn deploy

References:

https://medium.com/@kishandth.sivapalasundaram/how-to-deploy-your-react-app-to-a-github-user-page-d4b925cf5543

About

personal website


Languages

Language:JavaScript 66.1%Language:CSS 28.7%Language:HTML 5.2%