github-pages

How to set the URL for a GitHub Pages site?


According to the GitHub Pages official doc, if I create a repo named <username>.github.io, I will get a site at the URL https://<user_name>.github.io.

But as I tried, it seems I can create a repo of any name. And what I get is a site at the URL https://<user_name>.github.io/<repo_name>.

Is the doc outdated? And what's the real situation now?

Thanks.


Solution

  • Actually there are two types of github page sites.
    One is for org/user. But you can setup for a repo too:

    enter image description here

    Maybe the quickstart only shows one of the ways but as seen in docs, you can also setup project sites.