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 -von your terminalruby -vDon’t have Ruby? Click Here
- RubyGems. Normally when you install Ruby on Windows or MacOS, RubyGems are install automatically. Check using
gem -von terminalgem -vDon’t have? Click Here
- GCC. Check if you have GCC
gcc -v.gcc -vDon’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
_postsand create a file with the following formatYYYY-MM-DD-title.md.YYYYrepresente year (4 digits),MMrepresent month (2 digits),DDrepresents day (2 digits). In example, let’s create a file with this name2023-10-19-amazing-post.md - In
2023-10-19-amazing-post.mdbegin 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