Skip to content

Publishing your website

Jitin edited this page Oct 26, 2022 · 5 revisions

Using username.github.io

If you want to site to be available at https://<username>.github.io:

  1. While forking (i.e. after you have clicked "Use this template"), name the repository as "username.github.io"
  2. Change the _config.yml like this:
baseurl: "/"
url: "https://username.github.io"

Now, after under Settings -> Pages choose gh-pages as the branch from which the site is deployed

Using a custom domain

If you want to site to be available at https://customdomain.com:

Change the _config.yml as:

baseurl: ""
url: "https://customdomain.com"

Then you can add a custom domain under Settings -> Pages -> Custom Domain. Also, you will need to add A records or CNAME record with your DNS provider.

Clone this wiki locally