当前位置:网站首页>Quickly build a website with static files
Quickly build a website with static files
2022-08-04 01:03:00 【A-L-Kun】
Article table of contents
Deploy static files
I. Initialization
1. Create a file
First of all, we need to create our file, which can be written with a little content.Then the static files we wrote are added to the GitHub remote repository using git for us to deploy, here IIt is a simple post-management page built using the bootstrap framework, and also sets up the login interface and a help document
2. Upload file
We create a warehouse WebTest on GitHub to store our code, and the creation of the warehouse is also in articleMedium
After the repository is created, we start uploading our files. After the upload is complete, as shown below:

Then we start deploying our website
Second, GitHub
1. Basic deployment
First, let's talk about using GitHub to deploy a website

Then we can access our deployed projects through https://liuzhongkun1.github.io/WebTest/
The project address is: https://github.com/liuzhongkun1/WebTest
Principle:
We visit: https://liuzhongkun1.github.io/WebTest/ This address is equivalent to visiting https://liuzhongkun1.github.io/WebTest/index.htmlThe default access address of GitHub is index.htmlSo what should I do if I want to access help.html?Similar to the above visit, except that we need to enter the html file path:https://liuzhongkun1.github.io/WebTest/help.htmlSpecial Features:
Create a project named xxx.github.io (xxx is your username), and then deploy in the above way to get xxx.github.io .
For example, if my Github username is
liuzhongkun1, create a repository namedliuzhongkun1.github.ioand deploy it there.
2, framework deployment
Then the question is, how should we deploy Vue, react and other frameworks?
It's also very simple. These frameworks are essentially web files. We need to compile locally, package and create them, and then upload the files in the build directory to the prepared ones through git.In warehouse
The rest of the steps are similar to the above
Third, netlify
Then we will learn how to use netlify to deploy our static website
First we need to log in to this website with GitHub account, click import from Git

Click steps:
import from Git -> GitHub -> Authorize ->After authorization, select the warehouse where we need to deploy the website

Then we can configure our file

Skip the warning, because we are using static files and don't need to compile and then run the deployment, we can see

Let's take a look at the log information during the deployment process

So, can we change our site name?The answer is yes

Our site name changed from https://bucolic-figolla-b8ffb4.netlify.app/https://lzk.netlify.app/
At the same time, we can also bind the domain name we purchased to this:


However, since I don't have a domain name for the time being, I won't continue writing. You can read the official documentation to bind your own domain name.
边栏推荐
- LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
- typescript50 - type specification between cross types and interfaces
- 【性能优化】MySQL性能优化之存储引擎调优
- 轻量级网络整理及其在Yolov5上的实现
- typescript51 - basic use of generics
- 特征值与特征向量
- LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
- pygame 中的transform模块
- 2022 中国算力大会发布“创新先锋”优秀成果
- 2022年上半年各大厂Android面试题整理及答案解析(持续更新中......)
猜你喜欢
随机推荐
C 学生管理系统_添加学生
【详细教程】一文参透MongoDB聚合查询
typescript50-交叉类型和接口之间的类型说明
Tanabata festival coming, VR panoramic look god assists for you
boot issue
Slipper —— 虚点,最短路
[store mall project 01] environment preparation and testing
outputBufferIndex = mDecode.dequeueOutputBuffer(bufferInfo, 0) 一直返回为-1
Mvc、Mvp和Mvvm
typescript52 - simplify generic function calls
typescript51 - basic use of generics
typescript51-泛型的基本使用
typescript55-泛型约束
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三:两次优化
2023年航空航天、机械与机电工程国际会议(CAMME 2023)
js函数防抖和函数节流及其使用场景
typescript52-简化泛型函数调用
What warehouse management problems can WMS warehouse management system solve in the electronics industry?
Vant3—— 点击对应的name名称跳转到下一页对应的tab栏的name的位置
数组_滑动窗口 | leecode刷题笔记




![[store mall project 01] environment preparation and testing](/img/78/415b18a26fdc9e6f59b59ba0a00c4f.png)




