How do I create a home page for my GITHUB libraries?

Asked

Viewed 388 times

9

Usually, when we activate the github page for a particular package, a url is generated for you to publish documentation regarding a particular library in the Github.

In case if my account is called username and the library of lib, it is possible to 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 organization name.

However, now, I would like to know if there is any way to create a home page for that domain’s account github. Because actually, if I access http://username.github.io, appears as 404 - página não encontrada.

How to create a root for this special Github domain?

It is possible to do this, or this domain only serves for each library?

  • 1

    Cool. I’ve always been curious how to do that =)

  • Nice to know you helped. Take a look at our page phplegends.github.io

  • 3

    I wanted to understand what the problem is with my question to get negative. It is always welcome to leave comments so that we can improve the quality of the question and the site.

1 answer

11


Github Pages

You’re talking about the Github Pages. On Github, you can create the home page (at the domain root) of your account.

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

First, you should create a new repository. It can be in your account or in the account of the organization you created on Github. That repository should follow the following rule::

Bear the name <nome_do_usuario_ou_organizacao>.github.io. This should be followed to the letter to make it work. For example, if you have an account called sou-o-goku the repository shall be named after sou-o-goku.github.io

So, when you finish this operation, you just do the first git pull to the branch master, and you 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 the url http://minha-conta-github.github.io to check if everything went well.

Note: I found nothing in Portuguese about the subject, so I decided to do this post.

References:

  • I managed to do that.

  • 1

    Let me ask you a question. The repository is public, someone can mock my repository by giving some push ?

  • 1

    No. The repository is public for viewing. Only those who have your private key or in the same Organization that you are can "poke around" in the Object.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.