×


Using Jekyll to Create a Static Website on Ubuntu 22.04 (Jammy Jellyfish) - Step by step guide ?


Jekyll is an amazing static site generator by developers for developers to publish artistic static websites.

Here at LinuxAPT, we shall look into how to configure Jekyll on Ubuntu 22.04 LTS.


What we need to complete this Tutorial:

  • Ruby stack.
  • Gcc.
  • Make.
  • Bundler Gem.
  • Jekyll Gem.


To install the above packages, run the below commands:

$ sudo apt-get install ruby-full build-essential zlib1g-dev

To install Jekyll, run the below command:

$ gem install jekyll bundler


Steps to configure Jekyll

1. Create a new project

To begin, run the below command to create a new project and install the required gems and dependencies:

$ jekyll new jSite

This will create a new website.


2. Launch Jekyll Server

You can use the below command to launch the Jekyll server in your browser:

$ bundle exec jekyll serve


3. Confirm the launch using a browser

Now Launch your favorite browser to see if everything is working fine:

localhost:4000


4.  Work with _config.yml File

The _config.yml file keeps all of the configurations of Jekyll.

In this file, you will see:

  • title: Here you are supposed to add your website's title. Let it be LinuxApt.com
  • email: A global email for many reasons. Change it to email@linuxapt.com
  • description: This is the place where you introduce yourself globally. This can be used anywhere on the site then.

Next, you will provide your domain name linked to your hosting.

  • url: "yourdomain.com"

Now we will update social links as "linuxapt" for both Github and Twitter.

You can use nano to edit _config.yml file.


5. Run Jekyll Server Again

You will need to run the Jekyll server again to publish the site.

First, save the file, and close the editor. 

To serve the new website, simply run:

$ bundle exec jekyll serve

You can now edit HTML files and CSS to make it the best as desired.


[Need help in building your website on Linux ? We can help you. ]


Conclusion

This article covers how to customize Jekyll via its advanced configurations settings.In fact, You can add new CSS, HTML, and JavaScript to improve the website further or simply take an HTML template to improvise it. Ruby gems are not installable on Windows. Users often break their system while using ruby-full on Windows.


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com