Contents
Buil person website using GitHub & Jekyll
   Jun 4, 2022     2 min read

Build your first blog using GitHub and Jekyll

Contents

  • Introduction
  • Prerequisite
  • Build steps
  • Thanks

Introduction

If you are a student or programming beginner you may need a blog to display your technology skills to others or employers.
GitHub and Jekyll give you such chance and convenience.You can pick up a nice theme and just simply modify content and add your posts. **Prerequisite** * Known about simple knowledge about html. * Markdown is waht you use to write your posts. * GitHub account. * Using Git is recommended. * Know about [GitHub pages](https://pages.github.com/)

Build steps

OK. If you are ready. Let’s go.

Step 1:

Install Jekyll. You can know about how it works so you can deep into it quickly.

Step 2:

Pick up your favorite theme. You can click demo first. If you like it, you can go to the corresponding github repository and fork it.

Step 3:

Go to setting and change the repository name you forked to [youGitHubName].github.io, you should replace “[youGitHubName]” with your real GitHub name.

You can see whether your page has been hosted or not in Setting->Pages tab.

Step 4:

Clone the repository on your computer and modify the content. Generally, the README.md file in your just forked repository will tell you how to modify and how to use it.

If not, you need to look file with yml and md extension. In general, yml file will set variables about some functions(comments will tell you how to do, if not abandon this repository).

md file corresponding to some text. You can add your new posts in _posts directory using such format yyyy-mm-dd-yourpostname.md. It will be add in your website automatically.

I write a makefile to add current date prefix automatically.

In bash

make -f addDatePrefix name=you_post_title

Then rebuild the website to see change locally.

bundle exec jekyll serve

Then visit https://localhost:4000 after building complete.

Step 5:

Push your changes to the remote repository(you github repository). After mintutes, you will see change in your github page.

Congratulation, you did!

Thanks The theme I am using is power by MrGreens . Thank him.