VCHR0MBI3'S DIARY

Make it happen.

gh-pages

27 August 2017 3 mins read

Hello there,

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 ? 🤔😑

Haa, I enjoyed this summer also as usual with little bit of working. I visited my native village which I do every year. Also I learnt JavaScript in addition to HTML and CSS.

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 & GitHub Pages

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.

Why Github?

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.

img

Steps

  1. First of all, you need to have a GitHub account. Go to https://github.com/ and setup your account.

  2. Create a new repository with the name as username.github,io and and enter the details and click on the green Create repository button.

    img

  3. 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.

    img

  4. Clone the repository to your local machine.

     git clone https://github.com/username/username.github.io/
    
  5. 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.

  6. 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

Using Github

Using Github Pages

Using Git

  • Try Git - A 15-minute interactive tutorial if you want to be more familiar with Git at the command-line.
  • git - the simple guide - “just a simple guide for getting started with git. no deep shit”

Markdown