27 August 2017 • 3 mins read
Today I had to remember what I did during my summer vacation as I have to send my (late) vacation status update. Hmmm, What I did ? 🤔😑
I created a Wordpress blog (Yes! you are now reading it 😁) and also I tried to create my own portfolio page which I completed later. For that I chose Github pages and in this blog post I want tell about it (in brief).
GitHub Pages is a free place to store the files that run a website and host that website for people to visit (it only works for particular types of website, like basic HTML sites or Jekyll sites, and does not host databases).
GitHub is a visual way to use git, a system for versioning: keeping track of changes to computer files (including code and text documents) over time (as explained above). If you’re curious, here’s a friendly lesson for exploring GitHub.
Okay, here is the link to my portfolio page vchrombie.github.io.
Because it’s easy and free. And if you don’t like Github, you can take the exact code you’ve produced and put it anywhere else that acts as a web server. The important thing is: if you do want to learn web development, how to use Git, how to use Github, how to program, and so forth, this lesson provides a stepping-stone to those concepts as well as a canvas to practice on. And even if you don’t want to learn anything, you can come away with something useful: a customized web homepage that you can maintain yourself.
First of all, you need to have a GitHub account. Go to https://github.com/ and setup your account.
Create a new repository with the name as
username.github,io and and enter the details and click on the green
Create repository button.
Go to the Settings on the repository home page and scroll down to the GitHub Pages section and enable the option for GiHub pages, choose the master branch for the source.
Clone the repository to your local machine.
git clone https://github.com/username/username.github.io/
Enter the project folder and add an
index.html file. (Note: the filename should be
index.html as the server recognises that page to be displayed as the main page)
cd username.github.io/ echo "Hello World" > index.html
This is just a sample. You can make a beautiful website using HTML, CSS and JS libraries. You can use frameworks such as Bootstrap and Semantic UI too. Make sure you have
index.html as the main file.
Push the code to GitHub, add commit and push.
git add --all git commit -m "initial commit" git push -u origin master
That’s it and you are done! Fire up the browser eand go to https://username.github.io/
Go through these links and feel free to contact if you are stuck anywhere