Creating and Hosting a Personal Site on GitHub (2024)

Creating and Hosting a Personal Site on GitHub (3)

A step-by-step beginner’s guide to creating a personal website and blog and hosting it for free using GitHub Pages.

This guide is meant to help Git and GitHub beginners get up and running with GitHub Pages and Jekyll in an afternoon. It assumes you know very little about version control, Git, and GitHub. It is helpful if you know the basics of HTML and CSS since we’ll be working directly with these languages.

We’ll also be using a little bit of Markdown, but by no means do you need to be an expert with any of these languages.

The idea is to learn by doing, so the code we’ll be implementing in this tutorial is available in this guide or can be downloaded entirely at this GitHub repo. Feel free to copy and paste or type this code directly into your project’s files.

For a little background on why I chose GitHub and GitHub Pages for my personal website (and other projects) because of:

  • simplicity
  • good performance and reliability
  • no databases
  • hosting to be free or really cheap
  • a custom domain
  • the ability to work on my site from anywhere if needed
  • to use open source tools supported by an active development community
  • to get up and running quickly
  • to have version control on my website, preferably Git
  • to be able to share my code so others can easily re-use it.

In order to make GitHub Pages accessible to a wider audience, this guide focuses on using the web interface on github.com to build your personal website, thereby generalizing and glossing over the standard tools associated with Git and GitHub. To get a lot dirtier with Git and GitHub (ie, the command line and terminal), there are several other great guides you should also know about, probably bookmark, and read after completing this one, or jump over to if that is more your speed: Anna Debenham, Thinkful, and even GitHub itself go above and beyond making the command line or local workflow of GitHub hosting and Jekyll templates accessible to a wider audience.

Also, at the end of this document, there is a pretty good list of resources related to Git, GitHub/Pages, Jekyll, and Markdown that can help you dive deeper into these tools. I’ll do my best to keep this list updated as I find new ones.

Creating and Hosting a Personal Site on GitHub (4)

Git, GitHub, and GitHub Pages are all very closely related. Imagine Git as the workflow to get things done and GitHub and GitHub Pages as places to store the work you finish. Projects that use Git are stored publicly in GitHub and GitHub Pages, so in a very generalized way, Git is what you do locally on your own computer and GitHub is the place where all this gets stored publicly on a server.

Git is a version control system that tracks changes to files in a project over time.

Git is for people who want to maintain multiple versions of their files in an efficient manner and travel back in time to visit different versions without juggling numerous files along with their confusing names stored at different locations. Think of Git and version control like a magic undo button.

Creating and Hosting a Personal Site on GitHub (5)

I highly recommend this 15 minute, hands-on web tutorial on using Git.

Creating and Hosting a Personal Site on GitHub (6)

GitHub is a web hosting service for the source code of software and web development projects (or other text based projects) that use Git. In many cases, most of the code is publicly available, enabling developers to easily investigate, collaborate, download, use, improve, and remix that code. The container for the code of a specific project is called a repository.

There are thousands of really cool and exciting repositories on GitHub, with new ones added every day. Some examples of popular software development projects that make their code available on GitHub include:

  • Twitter Bootstrap, an extremely popular front-end framework for mobile first websites, created by developers at Twitter.
  • HTML5 Boilerplate, a front-end template for quickly building websites,
  • The JavaScript Visualization Library D3
  • Ruby on Rails, the open-source web framework built on Ruby.
Creating and Hosting a Personal Site on GitHub (7)

GitHub Pages are public webpages hosted for free through GitHub. GitHub users can create and host both personal websites (one allowed per user) and websites related to specific GitHub projects. Pages lets you do the same things as GitHub, but if the repository is named a certain way and files inside it are HTML or Markdown, you can view the file like any other website. GitHub Pages is the self-aware version of GitHub. Pages also comes with a powerful static site generator called Jekyll, which we’ll learn more about later on.

Don’t worry if some of these concepts are still a little fuzzy to you. The best way to learn this stuff is to just start doing the work, so let’s not waste anymore time and dive right in.

1.) Create your project’s repository. Login to your GitHub account and go to https://github.com/new or click the New repository icon from your account homepage.

Creating and Hosting a Personal Site on GitHub (8)
Creating and Hosting a Personal Site on GitHub (9)

2.) Name your repository username.github.io, replacing username with your GitHub username. Be sure it is public and go ahead and tell GitHub to create a README file upon generating the repo.

Creating and Hosting a Personal Site on GitHub (10)

3.) Create an index.html page by clicking the plus icon next to your repository name and typing the file name directly in the input box that appears.

Creating and Hosting a Personal Site on GitHub (11)

On the resulting page, put this markup inside of the GitHub text editor:

<!DOCTYPE html>
<html>
<head>
<title>Vaibhav Hariramani, A tech Blogger</title>
</head>
<body>
<nav>

<div >
<h1>Hi there, I'm Vaibhav Hariramani!</h1>
<p> <a href="/about">Read more about my life...</a></p>
</div>

<footer>
<ul>
<li><a href="mailto:vaibhav.hariramani01@gmail.com">email</a></li>
<li><a href="https://github.com/vaibhavhariaramani">Github</a></li>
</ul>
</footer>
</body>
</html>

4.) Commit index.html. At the bottom of the page, there is a text input area to add a description of your changes and a button to commit the file.

Creating and Hosting a Personal Site on GitHub (12)

5.) Repository Settings Head over to GitHub.com and create a new repository, or go to an existing one.
Click on the Settings tab.

Creating and Hosting a Personal Site on GitHub (13)

If you scroll down on the settings page, you’ll see the GitHub Pages section near the bottom. Click the Source button to start the process of creating your site.

Creating and Hosting a Personal Site on GitHub (14)

Select master branch

Creating and Hosting a Personal Site on GitHub (15)

Congrats! You just built your first GitHub Pages site. View it at http://username.github.io. Usually the first time your GitHub Pages site is created it takes 5–10 minutes to go live, so while you wait for that to happen, give this post a like ❤️.

Visit http://username.github.io to see your website. You can make it look like the page at https://vaibhavhariaramani.github.io/.

Checkout our Next Blog, to learn to create Complete Portfolio website and complete Blog Site.

ps: next blog on portfolio site coming soon’

Thank You for reading

Please give 👏🏻 Claps if you like the blog.

just a silly Geek who love to seek out new technologies and experience cool stuff.

If you want to get in touch and by the way, you know a good joke you can connect with me on Twitter or LinkedIn.

Thanks for reading!😄 🙌

if you find this blog beneficial for you don’t forget to share it with your friends and mention us as well. And Don’t forget to share us on Linkedin, instagram, facebook , twitter, Github

To learn more about these Resources you can Refer to some of these articles written by Me:-

Creating and Hosting a Personal Site on GitHub (16)

Download THE VAIBHAV HARIRAMANI APP consist of Tutorials,Projects,Blogs and Vlogs of our Site developed Using Android Studio with Web View try installing it in your android device.

on Linkedin, instagram, facebook , twitter, Github

Happy coding ❤️ .

Creating and Hosting a Personal Site on GitHub (2024)

FAQs

Creating and Hosting a Personal Site on GitHub? ›

You can use GitHub Pages to host a website about yourself, your organization, or your project directly from a repository on GitHub.com.

Can I host my personal website on GitHub? ›

You can use GitHub Pages to host a website about yourself, your organization, or your project directly from a repository on GitHub.com.

How do I create a personal GitHub site? ›

  1. Step 1: Setup. Install git on your machine. ...
  2. Step 2: Make a New Github Repository (AKA "repo") Make a github repo to host your site. ...
  3. Step 3: Make a Site and choose a Theme. ...
  4. Step 4: Edit Theme & Preview. ...
  5. Step 5: Publish! ...
  6. Step 6: Stage, Commit, and Push to Update.

Can I host a website on GitHub for free? ›

This is all possible thanks to the GitHub Pages feature, which is GitHub's very own free hosting service. Using GitHub Pages, you can create a website by simply publishing static HTML, JavaScript, and CSS files from GitHub's repository.

How much does it cost to host a website on GitHub? ›

Is GitHub hosting free, or are there any costs involved? GitHub offers free hosting for static websites through GitHub Pages. However, if you require custom domain support or need to host private repositories, there may be additional costs associated with those features.

Can I host my WordPress website on GitHub for free? ›

You can host your WordPress website on GitHub for free. This allows you to push your changes to your website directly from GitHub.

Can you use GitHub for personal use? ›

Personal accounts

Your personal account can own resources such as repositories, packages, and projects. Any time you take any action on GitHub.com, such as creating an issue or reviewing a pull request, the action is attributed to your personal account. Each personal account uses either GitHub Free or GitHub Pro.

Is GitHub free for personal use? ›

With GitHub Free for personal accounts, you can work with unlimited collaborators on unlimited public repositories with a full feature set, and on unlimited private repositories with a limited feature set.

Can you have a private GitHub page? ›

With access control for GitHub Pages, you can restrict access to your project site by publishing the site privately. A privately published site can only be accessed by people with read access to the repository the site is published from.

Can you make private projects on GitHub? ›

Projects can be public or private. For public projects, everyone on the internet can view the project. For private projects, only users granted at least read access can see the project.

How do I host my website for free? ›

Can I host a website for free? Yes, platforms such as Wix, Weebly, AwardSpace, and InfinityFree provide options to host websites for free. Each comes with different levels of storage, bandwidth, and server access. WordPress.com also offers a basic free hosting plan suitable for personal blogs and small websites.

Why is GitHub not hosting my website? ›

If you have named your repository correctly like <username>. github.io , and it is showing Github pages is under maintenance, then wait for a few minutes and then refresh. Your site will show up. But, if it is showing 404 error, then check if you have index.

Is GitHub self hosted free? ›

GitHub Actions usage is free for standard GitHub-hosted runners in public repositories, and for self-hosted runners. For private repositories, each GitHub account receives a certain amount of free minutes and storage for use with GitHub-hosted runners, depending on the account's plan.

How long does it take to host a website on GitHub? ›

In the "Code and automation" section of the sidebar, click Pages. To see your published site, under "GitHub Pages", click Visit site. Note: It can take up to 10 minutes for changes to your site to publish after you push the changes to GitHub.

Can I host a dynamic website on GitHub? ›

Can GitHub host a dynamic website? No, GitHub cannot host dynamic websites. But you can utilise serverless backend to provide dynamic features. Example of serverless backend services are Google Firebase, AWS API Gateway, MongoDB Stitch etc.

Is GitHub owned by Microsoft? ›

Acquisition by Microsoft

On June 4, 2018, Microsoft announced its intent to acquire GitHub for US$7.5 billion (~$8.96 billion in 2023). The deal closed on October 26, 2018. GitHub continued to operate independently as a community, platform and business.

Can I use my own domain with GitHub? ›

GitHub Pages supports using custom domains, or changing the root of your site's URL from the default, like octocat.github.io , to any domain you own.

Can you make GitHub website private? ›

With access control for GitHub Pages, you can restrict access to your project site by publishing the site privately. A privately published site can only be accessed by people with read access to the repository the site is published from.

Can GitHub host a dynamic website? ›

GitHub supports hosting a static website but if you have a dynamic website, you can choose another service that can provide you with better functionalities and support.

Can I host my website with database on GitHub? ›

GitHub only hosts text files and images, they don't host databases and they don't process server code. So what you want to do instead is find a hosting provider that will allow you to create a php website and host a database … Heroku, GoDaddy, linnode, aws, etc.

References

Top Articles
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 6497

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.