Deploy static pages on github

Use github-page to deploy static pages

need

If you have worked so hard to write a static webpage, you really want to show it off so that everyone can see my webpage through public network access. But I don't want to be too troublesome, buying a server, installing software, deploying the environment, configuring domain names, filing, and so on.

Here is the easiest way to use the gitpage function to deploy your webpage through gitpage, and everyone can see your webpage through the public network, which saves the trouble of selling servers, configuring by yourself, and filing.

Introduction to Gitpage

文档主页:GitHub Pages | Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.

Introductory video: https://www.youtube.com/embed/2MsN8gpT6jY

Simply put, gitpage is a tool provided by the git platform to help you deploy the upper limit of web pages. The uploaded page code goes live with the code you upload to the hosted github platform. You don't need to think about servers, installation and deployment software, network problems, domain names, filing and other issues. One-click launch of your code. Extremely convenient.

To launch your web page code, you need to follow the steps below.

Step 1 - New Project

Create a new project on your github platform (if you have a github account, you can register yourself)

Create your web project repository:

important point:

  1. The project name must be in this format: account name.github.io (gitpage cannot be used without this format).
  2. The project repository must be public, not private. Private ones cannot use gitpage.

Step 2 - Upload code

I have written my page code locally:

 Upload my code to my built warehouse:

 Note: There must be an index.html webpage file in the root directory of the warehouse! After gitpage launches your code, it will automatically open index.html. Without this file, gitpage cannot be used.

 Step 3 - service start check view web link

As shown in the picture: In the setting (settings), click on the page, and after a few seconds, a link to go online will appear in the yellow box. Enter this link to see the web page you have written.

If there is no link, it means that the online is not successful, check whether the attention points in the steps above are operated incorrectly.

If your code can go online normally, you can find the code page, the development status in the lower left corner, and a github-page activation display.

Disadvantages:

The web server that Gitpage helps you go online is located abroad, and the domestic access speed is a bit slow. Easy to get stuck.

Of course there are ways. The domestic version of gitee has also launched the giteepage function, you can upload your code to gitee, the access speed is much faster, and the deployment method is also very convenient. I will introduce giteepage in gitee in this blog.

https://blog.csdn.net/qq_58832911/article/details/128033181icon-default.png?t=M85Bhttps://blog.csdn.net/qq_58832911/article/details/128033181

This is the webpage I deployed, welcome to visit:

Boris - Zhang Bohan - Personal homepage algorithm engineer, a code farmer who loves life, likes music, photography, and cooking. http://boris-123.gitee.io/boris-2021.github.io/

Guess you like

Origin blog.csdn.net/qq_58832911/article/details/128028317