How to make a static blog website & host with Github Pages

How to make a static blog website & host with Github Pages

ยท

2 min read

Today we will understand how to make a simple and static blog website where we can host our blogs by just uploading each blog file only. This will be hosted with Github pages which is free.

PREREQUISITES :

  1. A GitHub account ( free or paid ).

  2. Some knowledge of markdown or HTML. If not, then also not a problem, one can always learn by doing.

STEPS:

  1. Create a new repository named USERNAME.github.io, where the username is your GitHub username. See below for reference:

  2. Make sure you keep it as Public .

  3. Clone the repository to your local machine using Git.

     git clone https://github.com/username/username.github.io.git
    
  4. Choose a static site generator such as Jekyll, Hugo, or Gatsby, and install it on your machine(Jekyll is my recommendation).Each generator has its own installation process, so refer to their documentation for specific instructions.

  5. Create a basic template and write some content for your blog using the static site generator. You can choose a pre-made theme or create your own.

  6. Commit and push your changes: Go back to the terminal or command prompt and navigate to the repository on your local machine. Then, add the changes, commit the changes, and push the changes to the repository on GitHub using the following commands:

git add .
git commit -m "Initial commit"
git push origin master
  1. Now comes the most amazing part, customize your blog by changing the theme, adding pages, and configuring options in the static site generator. This is where you can show your creativity and make your blog site like yourself.

  2. The rest of the things are for you to figure out as you can only learn if you do it by yourself. You have the whole internet, dive deep and learn more.

I have made this article from my own experience and by learning from many documents and articles, if there is any mistake comment below and if you have ideas to improve this article, reach out to me. If you found my blog interesting and want to hire me, email me at

Did you find this article valuable?

Support Md Faizan Alam by becoming a sponsor. Any amount is appreciated!

ย