De­ploy­ing your blog on the Web with Github pages

OpenSource For You - - DEVELOPERS -

Your blog is ready for the world to see. The good news is that GitHub (so­cial code host­ing that hack­ers love) al­lows you to host your Jekyll-based site for free. I as­sume you al­ready have a GitHub ac­count; if not, sign up at https:// Jithub.FRP/. You will be mak­ing use of GitHub UserL Or­ga­ni­za­tion Pages to host your blog.

Cre­ate a new GitHub repos­i­tory as usHr­naPH.Jithub.FRP; in our case, it was Pyth17.Jithub.FRP. Make sure to fol­low this nam­ing con­ven­tion, else you will end up with an eTTP 404 Not Found er­ror. In this new repos­i­tory, the mas­ter branch hosts the _de­ploy folder and serves your blog. The source for the blog is based on the source branch. To set up the in­stance with GitHub, run the fol­low­ing rake task:

rake se­tup_github_­pages

You will be asked to en­ter your GitHub pages’ repos­i­tory URL, which is [email protected]:0yth17/Pyth17.Jithub.FRP. git, in our case.

You might even be will­ing to point your own do­main to GitHub pages. This is easy to achieve. Un­der your source GLUHFWRUy, FUHDWH D QHw fiOH QDPHG C1AM(, DQG WySH LQ your cus­tom do­main. In this case, I will have it as niti.sh. aepend­ing on what­ever reg­is­trar your do­main is with, point an A record to the IP ad­dress 207.97.227.245.

Fi­nally, to de­ploy the blog, is­sue the fol­low­ing com­mand: rake gen­er­ate rake de­ploy

At this mo­ment, you will re­ceive an email from GitHub, with the sub­ject PaJH builG suFFHss­ful. In this par­tic­u­lar in­stance, the blog has been suc­cess­fully set up on Pyth17. Jithub.FRP and niti.sh. aon’t for­get to com­mit your blog

changes to the source branch with Git. This is as sim­ple as us­ing the fol­low­ing code: git add . git cRm­mit -m ‘FiUVt EORg 3RVt’ git push ori­gin source

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.