website
1. GitHub Page
- Open
package.jsonand update the following values:- homepage: set to
http://{github-username}.github.io/{repo-name}, wheregithub-usernameis your GitHub username andrepo-nameis the what you named this portfolio repo when you created it - build-gh: replace
github-usernamewith your GitHub username andrepo-namewith the repository name
- homepage: set to
- Commit and push those changes to
package.jsonto your GitHub remote repo. - Open a new terminal from the menu or by pressing
ctrl+shift+ ` (or open top left menu, select “Terminal” and “New Terminal”) - Within the terminal window run
npm run deploy. This will first run the pre-deploy script to build the project, followed by the deploy script that will push those bundled files to a new branch on your repo (gh-pages) that will be used for you GitHub Pages site. - When completed, within your repo, go to Settings and Pages. There you will see that a page has been set up to for you against the gh-pages branch, and you should see the URL (that should match the “homepage” value you set in package.json)
2. 阿里云 Custom domain
This post is licensed under CC BY 4.0 by the author.