How I created site with minimum investment.
This is story about my site, GitHub and laziness
At first, great thanks to GitHub and viva open-source! It’s really cool that people share with each other.
One day I thought: I’m developer and have some sites done. I need my own site. To let people know who I am and what I’m doing.
The cobbler’s children are always the worst-shod
And it’s fair enough to web-developers. Not all of us have a web-site. Someone too lazy to do it, someone don’t want it. Someone do not have enough time to do it. It’s a different reasons. But it’s try. And I was one of them. But now the thing is changing. I launched my own site. So people could write an email to me, read about me and see my portfolio. And it’s really cool. Some kind of business card without any printing spendings.
But there is a lot of work to do it, you have to create design and to put it into the web you need a server. Yeah, it’s true. But if you search for some time (maybe minutes, maybe hours, who knows) you’ll find some cool stuff like free html templates and web-services, that provides free host. That’s why I love Internet. Between tons of trash you could find a diamond.
You can find a lot of open source stuff there.
But git repository is not everything that github provides. There is cool thing, called GitHub Pages. On this page you could find good explanation of how to use it, but I provide my own explanation.
Github pages really cool thing, because it provides free host and you could use Jekyll with it, which will help you to create multi-page site. Here’s documentation on it. But I stop at static single page.
So what is my goal? My goal is to have single-page site. With send email form and gallery for my works.
I found suitable html-template (no link, you could easily google it) (actually there was two of them). One as main page template and the second as template for works gallery. Cool.
What’s next? Form? In my past I used to send forms via PHP. But github pages do not support PHP. So I could use something else.
I was looking at the cool site based on github pages and found form, I need. How did he process it? Little inspection and I found what I’m looking for. It’s formspree! Some tests for it and I like it! Cool. Simple. Useful. They do all the checks including captcha check. Cool stuff.
So the code of my site is ready. Now I should use github pages to make it world-wide accessible.
The first step is to create account (if you don’t have one).
The second step is to create repository, called github_username.github.io, where replace github_username with your user name. For example: john_doe.
The third step is to add all the files to your repo and push it.
Notice: github pages works with master branch. So, if you work in another branch, you should merge your changes to master.
Congratulations! Your site is on the web now! You could access it by visiting address https://github_username.github.io/.
Yeah, it’s that simple.
But what if you want to use your own domain name? What should you do? The thing is simple too. But at first you should buy domain name. In my case it was itilin.by and I bought it from hb.by. belarussian host and domain provider.
After you buy domain name, visit domain control panel (it could be different for different providers). On page manage DNS records delete all records with type “A” and add next records:
@ A 184.108.40.206
@ A 220.127.116.11
www CNAME *your_github_username*.github.io.
Notice: do not forget “.” after link to github pages, but note that some providers put it automatically.
Then add to your repository file CNAME(without any extension), which contains you domain name without http://. in my case it looks like this:
After you do everything described above, wait while DNS updates. It may took some time (from few minutes to the whole day). And now you can visit your site on your domain name.
So in my case site hosted on github pages, but has it’s own domain name. You can visit it here. That the simple way to create your site. If you still need help, you could write me.
Thanks for reading! Please go ahead comment, like and share!
P.S. Checkout my site http://itilin.by/. If you find some bugs don’t hesitate to write me an email.