Skip to content

How to use a custom domain?

Thomasorus edited this page May 23, 2021 · 4 revisions

You're all set, everything is working and your website has amazing content. You want to go to the next step and have your own domain name. Once you've bought it, just follow the official github pages documentation to link everything together.

But there's one more step for us! Since we are deleting and rebuilding the website each time, we need to create a CNAME file inside our build process. Fortunately everything is ready and you only have to edit a single file!

Follow these steps:

  1. Go to the .github/workflows folder.
  2. Edit the main.yml file.

Now in the file, you'll notice that some lines have a # character in front of them.

Screenshot_2021-02-24 Thomasorus Chisai(1)

  1. We need to remove those # characters from those lines.
  2. Replace the mydomain.com text with your own domain.
  3. Save the file.

Don't forget to also change the absolute_build_url inside the config.py file as explained in this page!

And that's all, you're all set. Next time you edit a file, everything should be working.

But wait! Your readers don't like the colors of the website. Maybe it's time for a relooking