The static page deployment to github.io

background:

  My Tencent cloud server before using the student status (a discount) to buy now will soon expire, and with only one boot server pages (static pages) as well as with, other projects are useless. So we are looking to spend money on a non-server can access methods to my guide page. Then suddenly thought of before among small partners said hexo a blog is very easy and is hosted on github, I wanted to be able in a similar way to their static pages are also hosted on github.

effect:

  page.zhuchenglin.cn

premise:

  This method can only be used to deploy static page, but you can open code, so do not plan to save money to some private items such deployment.

Deployment steps:

  1. If you do not register a partnership github github account
  2. Github project created on a public (Note that if you create a private project, and from outside access to html, which is fee-charging! $ 7 / month)
  3. There in the Settings in the Options in GitHub Pages option, select the master branch, following Choose a theme not vote for the election will do, and then Custom domain after which fill their own second-level domain
  4. The project will be cloned to the local, to complete their static pages on this project, and then submit and pushed to the remote
  5. This time you can use github account .github.io / project name / .html page to access your page
  6. Enter your domain name management background (Ali cloud or other), opened a secondary DNS CNAME type to github account .github.io, Note: The two domain names to the secondary domain name in step 3 is consistent

If normal, this page can now be accessed through the secondary domain name of your settings.

note:

  1. After completion of the above step 3, where the project will be more than a CNAME file (if Step 3 Choose a theme would have been more than a _config.yml file). This file is used to control the CNAME domain name, only one domain name, if there are multiple, redundant will be invalid. If you own secondary domain name change, you can modify the contents of the file directly.
  2. Do not be so certain proprietary code deployment, deployment can be paid or
  3. This approach can only deploy open source static page, the code can not deploy the back-end contains language

For reprint please indicate the source: https://www.cnblogs.com/zhuchenglin/p/11574840.html

Guess you like

Origin www.cnblogs.com/zhuchenglin/p/11574840.html