index.md
)In GitKraken create a file in your repository called index.md
.
index
files have special meaning and represent the entry point to any website - the “Default” webpage.
To create a new file in GitKraken Client, we can use the Command Palette.
To initiate the Command Palette, hit | Ctrl + P, type Create File, and hit Enter.
Then enter the file name index.md
.
index.md
I’ve added some welcoming text to my landing page.
I also added:
# My first Website
Welcome to my website!
I created this website during [this workshop](https://r-rse-git-github-zero2hero.netlify.app/)
![](belinda-fewings-6wAGwpsXHE0-unsplash.jpg)
Photo by <a href="https://unsplash.com/@bel2000a?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Belinda Fewings</a> on <a href="https://unsplash.com/photos/6wAGwpsXHE0?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
index.md
index.md
and any images you added.Now we need to enable GitHub Pages in order to tell GitHub to serve your repository as a website.
On your GitHub repository, go to the Settings (top right-ish tab).
In Settings, scroll down on the left navigation panel the Pages section.
This opens up the GitHub Pages panel where we can configure how we want our website to be served.
Under the Build and deployment section:
main
branch and
/(root)
of the directory as the source for your website’s content.Once you click on Save, GitHub will start building your website in the background (this might take a minute)
In the meantime, while our website is being built and in the interest of security, let’s go ahead and enable HTTPS by scrolling down and ticking the Enable HTTPS option.
Once your page is built, the details including the URL to your site will be shown on your GitHub Pages panel (you might need to refresh the page for it to appear).
Click on Visit site to launch your webpage!
It’s nice for visitors to your repository to be able to easily find their way to your website.
A simple way to do this is to add the URL to your website to your repository metadata.
To do so, first copy the URL from your browser (or your GitHub Pages panel).
Next, head back to the root of your repository on GitHub.
On the right hand About panel, click on the button.
Paste the URL to your site in the Website field and Save changes
Your now easily get to your site through the About metadata panel!