Once you have installed Jekyll on your computer, the next step is to create your website.
In this article, you will explore all the 3 methods used to create a Jekyll website. By the end of this article, you will have a better understanding of the different methods available and be able to choose the one that suits your needs.
Let’s get started!
3 Methods of Creating A Jekyll Website
1. Create a Blank Jekyll Website
To create a new Blank Jekyll website, open your commandline tool and run the command:
jekyll new company-website --blank
This will Creates a new blank Jekyll site inside the folder company-website
. You can subtitute the company-name
with the any folder name you want.
Then, get inside your folder using the command:
cd company-website
Run the website by starting the Jekyll server using the command jekyll serve
or jekyll s
.
Finally, open your web browser and go to http://localhost:4000 to view your Jekyll website.
2. Create a Jekyll Website With Default Theme(Minima)
You can create a new Jekyll website that will use the default minima theme by using the command:
jekyll new blog-website
You have created a new Jekyll website in the blog-website
folder. This website uses Minima theme. It also has example pages and posts that are meant to guide you on how to add new content.
To view your website on your a browser, first get inside the folder using:
cd blog-website
Then run the website using:
jekyll serve
Open your web browser and go to http://localhost:4000 to view your Jekyll website.
In this setup you do not have direct access to the theme files on your project folder.
You can always change the theme from Minima to a theme of your choice.
3. Create Jekyll Website Using Jekyll Theme Templates
Find a suitable Jekyll Website Theme template. Then, click on its Github link. For the purpose of this tutorial, I will be using the Chirpy Jekyll themetemplate. You can take a look at the Chirpy’s demo website.
Click on use this template
. For templates without this option, use fork instead.
Clone or download the website as zip file. Which
- You can clone the Github repository using git bash or Github Desktop.
- You can also download as a ZIP file. Then unzip the file on your computer.
Whichever method you use, you will get your a folder with all your files.
Next, get inside your website folder using: cd
To install everything your website needs so that it can run smoothly, use the command:
bundle
You will see some packages being downloaded and installed. Once that finishes running, you can run the website locally on your computer using:
jekyll serve
If that does not work, use bundle exec jekyll serve
instead.
On your browser, visit the address http://localhost:4000
to view your website.
What Happens Next
That’s it! You’ve successfully created a new Jekyll website in 3 different ways. At this point, you can change the theme, start customizing your site or adding your content.