🏠Homepage
Create a GitHub Account
Create a Repository for Your Website
username.github.io
(replace username
with your actual GitHub username).Add Files to Your Repository
git clone https://github.com/username/username.github.io.git
Add an index.html
file as your homepage. Here’s a basic template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Personal Website</title>
</head>
<body>
<h1>Welcome to My Personal Website</h1>
<p>This is a simple personal website hosted on GitHub Pages.</p>
</body>
</html>
Push Your Files to GitHub
If you’re working locally, after adding your index.html
, push the changes to GitHub:
git add .
git commit -m "Initial website"
git push origin main
Enable GitHub Pages
https://username.github.io/
.Customizing Your Website
about.html
or style your site using CSS by adding a style.css
file.Check Your Website
https://username.github.io/
. Your personal website should be live!
—
Free Hosting
Easy to Set Up
Custom Domain
username.github.io
.Version Control
Great for Static Sites
SSL by Default
Limited to Static Sites
Basic Customization
Lack of Built-in Analytics
Performance for Complex Sites
Limitations in Storage and Bandwidth
Using GitHub Pages is a great choice for personal portfolios, project documentation, or simple blogs. It’s a solid platform to quickly set up a personal website, especially for developers. However, for more complex websites or dynamic applications, you might need to explore other options.
🏠Homepage