How to Build a Jekyll Blog
What is Jekyll ?
Jekyll is a static site generator, typically used for GitHub Pages but not exclusively.
Blog posts usually written in Markdown format (.md).
Prerequisites
- Ruby Version 2.5 or higher. Check your Ruby version using the command
ruby -v
on your terminalruby -v
Don’t have Ruby? Click Here
- RubyGems. Normally when you install Ruby on Windows or MacOS, RubyGems are install automatically. Check using
gem -v
on terminalgem -v
Don’t have? Click Here
- GCC. Check if you have GCC
gcc -v
.gcc -v
Don’t have GCC ? Click Here
Instructions
- Install jekyll and bundler gems. Into your terminal, type:
gem install jekyll bundler
- Create a new jekyll site
jekyll new myblog
- Change into your new directory
cd myblog
- Open a local server
bundle exec jekyll serve
- In your Browser type:
http://localhost:4000
Post your Fist Blog Post
- Open your project in your favorite IDE
- into project search
_posts
and create a file with the following formatYYYY-MM-DD-title.md
.YYYY
represente year (4 digits),MM
represent month (2 digits),DD
represents day (2 digits). In example, let’s create a file with this name2023-10-19-amazing-post.md
- In
2023-10-19-amazing-post.md
begin with a front matter then start inserting content
---
layout: post #this is wich format the your page be like
title: "Welcome To My Amazing Post"
---
# Welcome
**Hello World**, my name is Ravi
This is my first Post