Skip to content

Instantly share code, notes, and snippets.

@codeadamca
Last active July 26, 2024 15:36
Show Gist options
  • Save codeadamca/bc3dcb6fc768ee1714918aa15cf13fad to your computer and use it in GitHub Desktop.
Save codeadamca/bc3dcb6fc768ee1714918aa15cf13fad to your computer and use it in GitHub Desktop.
Setting up your username.github.io page

Setting up your username.github.io Page

When you setup GitHub pages, by default your content is available at https://<GITHUB_USERNAMNE>.github.io/<REPO_NAME>/.

However, if you create a repo with the exact name <GITHUB_USERNAME>.github.io, GitHub will automatically turn GitHub Pages on, and make this content avialable at https://<GITHUB_USERNAME>.github.io/. Kind of like your GitHub home page!

For example, I set up a sample at:
https://github.com/codeadamca/codeadamca.github.io

The repo is avilable as a website at:
https://codeadamca.github.io

This also works for organizations using a repo named <GITHUB_ORGANIZATION>.github.io.

For example BrickMMO has a page at:
https://brickmmo.github.io/

This setup also has the added benefit that your <GITHUB_USERNAME>.github.io website is the root of your other websites using GitHub Pages. So you can place a favicon (or other shared root files) in your <GITHUB_USERNAME>.github.io repo and it will be used by sites such as https://<GITHUB_USERNAMNE>.github.io/<REPO_NAME>/.

This GitHub Pages site uses my favicon.ico file from my codeadamca.github.io site:
https://codeadamca.github.io/about-me/

@AS-EBaiden
Copy link

AS-EBaiden commented Mar 25, 2024

im curious, can we do something like this? [repo-name].[username].github.io ?

@tahayparker
Copy link

@AS-EBaiden did you figure it out? is it possible to do so?

im curious, can we do something like this? [repo-name].[username].github.io ?

@codeadamca
Copy link
Author

im curious, can we do something like this? [repo-name].[username].github.io ?

I do not think this is possible.

@AS-EBaiden
Copy link

☹ it is not possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment