An Interest In:
Web News this Week
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
- March 13, 2024
January 17, 2022 06:17 pm GMT
Original Link: https://dev.to/lachouri/host-your-website-on-github-pages-gie
Host your website on GitHub Pages
Did you know that you can host a website on GitHub, for free ?
No ? Then let me show you.
You need to create a repository that has the following name :
for me this would be lachouri.github.io, and make it public.
Then, simply to test it, I am going to create an index.html file with a bit of code and I will push it on github.
- Then initialize the repo with
git init
- Create a commit with
git add.
andgit commit -m "First commit"
- Create the main branch with
git branch -M main
- Link your local repo to the git repository with
git remote add origin https://github.com/yourUsername/yourRepo
- Finally push with
git push -u origin main
Wait for a minute or so, and go to the following url: https://yourUsername.github.io and your website appears.
Originally posted on my blog. Check out my instagram account to learn more about web development.
Original Link: https://dev.to/lachouri/host-your-website-on-github-pages-gie
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To