sequence
Individual users usually practice some projects by themselves, but most of the time these projects are viewed locally. What should I do if I want others to be able to see the website project I made?
- Publish to the server
Generally speaking, domain names and servers need money to purchase, such as Tencent Cloud and Alibaba Cloud servers. If you want to use Alibaba Cloud to build a personal website, you can refer to this article: Domain name and server purchase and configuration
Of course, there is also a free option here. You can configure the website project to GitHub or gitee for viewing. This article mainly talks about how to build a website on gitee code cloud (゜▽^*))
first step
Create a personal warehouse on Code Cloud. The name of the warehouse must be the same as the user name.
At this point, the warehouse has been created.
Second step
Submit the website page you want to display to the warehouse, you need an index.html page
I made a personal component API website, and submitted the dist packaged by npm run build to the warehouse
note
After packaging, the path used by the static folder in the index.html file is an absolute path, so it needs to be modified to a relative path.
You can refer to: npm run build packaging path problem
This submission is accepted in the warehouse. The submission tool I use is Tortoisegit. For specific usage, please refer to this blog post: Installation and use of Tortoisegit tool
third step
Enter the gitee pages page to set
Gitee Pages page, click to start
Successfully started
end
Now, the website has been successfully published to the gitee code cloud, and it can be accessed through the website URL
http://wzckongchengji.gitee.io/kongchengji
Website performance: