Creating static website

Started by seocyrusjpr, Oct 27, 2022, 09:26 AM

Previous topic - Next topic

seocyrusjprTopic starter

The other day, a good friend asked me to write a web site for his small business. Since I haven't done anything like this before and I really like to learn something new, I agreed. Since I have a budget - thanks in the amount of 1 piece, then the hosting for the page had to be found free.
Various services were the first to be Googled, which, judging by the reviews, inserted their ads on the pages, and after 3 months of the site's existence, they put forward an ultimatum at all - pay or fail. Since this is not the best option, I wanted to find something simpler. Once it was possible to host static websites in a dropbox, but this feature was quickly covered up.
The same function is available in Google drive, but in August of this year it is also going to be disabled. As a result, there was a way out - github. Yes, you can host your website in a public repository, this procedure is not completely trivial, so I decided to write a little instruction, in case someone comes in handy. And so, in order.

After registering on creating a repository. The repository name must be in the form of $ (hereafter replace $username with your user name)
In my case it is
Creating a free static website Website, Hosting, Development, Long-post

Next, open the repository settings and click Launch Automatic Page generator
Creating a free static website Website, Hosting, Development, Long-post
And click Publish page. That's it, now the site opens at
All the necessary files and folders have been created in the repository, you can edit, add and delete them, the site is working.

The content of the site is updated about once every 10 minutes, so don't be surprised if the site wasn't created immediately or the changes didn't apply. We have to wait.

Now the domain, where is it without it? By registering it on any domain trading platform  go to the "zone management" menu.
Domain resource records are stored here. Records that link a domain to an IP address or URL.
You need to add two A records with addresses

and one CNAME record with the subdomain "www" and the value "$ ." (note the dot at the end, it's important).
also, in the root folder of the repository with your site, you need to create a CNAME file with your domain inside.
In my case, the resource records turned out like this:
Creating a free static website Website, Hosting, Development, Long-post

Unfortunately, in many cases, Cyrillic domains need to be translated into this format "under the hood" of the site.
If I had known this from the very beginning, I would not have registered it.
And that way, the site is written and working. But in search engines it is issued on 4-6 pages of results.


it is not a problem to create and web hosting on such a site like stopcomar, where a maximum of 55-260 people per day can go to the old computer and into the closet, but promotion if you manage to get to the first 4 positions by direct requests, it will be interesting.
and a computer or some arduino in the closet, it's not free, and if the ip is dynamic at the provider, then it's also quite so-so..


On a modern web project, the entire JS is one knocked-down file.
Even for a rather big project, its size usually does not exceed 3Mb (although this is not at all small, but normally 1-2 meters). Even a 3MB file, if you enable gzip at the web server level, is squeezed by 60-75%, that is, the output is somewhere a meter. Even on the mobile Internet, this file is downloaded in seconds (less than 10).

Navigation on the same react-router generates the usual tags <a .../>, and even if the user wanted to go somewhere urgently, by clicking he will go to another page as on a regular site. And it will be recorded in the browser history and everything is OK here with arrow transitions.
Let me clarify that by SPA I now mean not some landing page with hash links, but a full-fledged JS site.

You are also right with checkboxes, a common situation. But on the same reaction, you can make regular forms that work without JS. Here, of course, everything is lost in terms of states, but it does not interfere with clicking on submit to send the form data in the classic way.
That is, you are talking about common mistakes that are really very common, but I am saying that with the right approach, they are all solved, today there are all the necessary techniques to solve these problems.