How do I create a homepage for my GITHUB libraries?

8

Generally, when we enable github page for a given package, a url is generated for you to publish documentation about a particular library in Github .

In case, if my account is called username and the lib library, you can access this page by the following url:

  http://username.github.io/lib

For organizations, follow the same rule above, but instead of using the user name, use the name of the organization.

Now, however, I'd like to know if there is any way to create a master page for that domain from the github account. For now, if I access http://username.github.io , it consists of 404 - página não encontrada .

How to create a root for this special Github domain?

Is it possible to do this, or is this domain only for each library?

    
asked by anonymous 13.04.2016 / 13:47

1 answer

10

Github Pages

You're talking about Github Pages . In Github, you can instead create the main (domain root) page of your account.

You should pay close attention because you need to do this manually.

First, you must create a new repository. It may be in your account or in the organization account you created in Github . This repository should follow the following rule:

Have the name <nome_do_usuario_ou_organizacao>.github.io . This must be followed precisely to get it right. For example, if you have an account called sou-o-goku the repository should be named sou-o-goku.github.io

So when you finish this operation, you only have to make the first git pull for the master branch, and you will see your Github page working.

Example:

 git init
 echo "Minha página inicial" > index.html
 git add .
 git commit -am "Meu primeiro commit"
 git push -u origin master

After that, just go to% ur_% to see if everything worked out.

Note : I did not find anything in Portuguese about the subject, so I decided to do this post.

References:

13.04.2016 / 13:47