6/17/2023 0 Comments Github pages free![]() There’s ample documentation on how to set up either a User Site or a Project Site with a custom URL, but no information about having both together. ![]() My problem was that I couldn’t find any documentation on how to do that. This works, but that’s not a very professional URL! I already bought the URL “”, and I wanted that URL to be used for my new GitHub Project Site of the “attalitech” repository. So I created a repository called “attalitech”, built the website (using my theme Beautiful Jekyll), and now I had it hosted for free at /attalitech. Last month, I decided to move my consulting website,, to use GitHub Pages. Similarly, any other GitHub repository that I create will have its Project Site at /. Since I have a custom domain for “”, then the shinyjs website is also available at /shinyjs. For example, my project shinyjs has a Project Site, and according to the GitHub Pages URL rules it’s accessible from /shinyjs. I also have several projects in GitHub that have their own GitHub Pages websites. I’ve purchased the domain name “” from Namecheap and connected it to my repository, so now my website is also accessible from. Since 2015, I’ve hosted my personal website in the GitHub repository “”, which means the URL for my website is. If you want to use your own custom URL, you can purchase a domain name (I use Namecheap and pay about $10/year) and follow GitHub’s documentation on connecting your custom domain to your GitHub Pages website. ![]() These are called Project Sites because any project (repository) you create can have a website with this URL. ![]() Any other repository you create, for example “M圜oolProject”, will be available at. That’s called a User Site, because any GitHub user can have one such repository with their username. If you create a repository with the special name “”, then GitHub Pages will generate your website for that repository at. Suppose your GitHub user name is “daattali”. GitHub Pages is a great way to host a static website for free–any GitHub repository you create can have a corresponding website with a special URL. But it’s actually very simple, as this step-by-step guide will show you. On the other hand, setting up two (or more) GitHub Pages sites within the same GitHub account has no documentation and can be confusing. Setting up a GitHub Pages site with a custom domain name is relatively simple and has lots of documentation. So, add a destination key in _config.yml and set it to. Since we are deploying this to GitHub pages, by default it uses the content of docs directory in your repository. So, baseurl should be /REPOSITORY-NAME part of your URL, and url should be part of your URL. When creating a website in GitHub pages, usually the format of the URL will be: destination: The directory in which the build goes to.url: this is the main URL of the website.baseurl: this needs to be the subpath of the website.In _config.yml you need to change three key values: There are some changes you need to make in the website. Click Save, and GitHub will start compiling your website. Here, you will need to pick a Source branch and then the root directory. Next, go to Settings and scroll down to GitHub Pages If not, then create one and commit your work to it. Once you are done making the website, you can now deploy it on GitHub pages for free.įirst, you need to have a repository for your website on GitHub. If you now refresh the page, you'll see that the site title color is red. ![]() The previous head code can be used, as assets/styles.sass will be compiled to assets/styles.css. After that, you can add any styles you need.įinally, we need to import it in the of the page. The first two dash lines tells Jekyll to compile and add this file to the build. ![]()
0 Comments
Leave a Reply. |