Post

website

1. GitHub Page

  1. Openpackage.jsonand update the following values:
    1. homepage: set to http://{github-username}.github.io/{repo-name}, where github-username is your GitHub username and repo-name is the what you named this portfolio repo when you created it
    2. build-gh: replace github-username with your GitHub username and repo-name with the repository name
  2. Commit and push those changes to package.json to your GitHub remote repo.
  3. Open a new terminal from the menu or by pressing ctrl + shift + ` (or open top left menu, select “Terminal” and “New Terminal”)
  4. 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.
  5. 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

DNS解析

This post is licensed under CC BY 4.0 by the author.