Install MiddleMan on Ubuntu 20.04

MiddleMan static site generator is based on ruby scripts. It uses the power of ruby scripts to turn simple files and folders into fully responsive websites. It does not have any prerequisites except ruby itself. MiddleMan uses markdown and ruby templates to generate static websites. 

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Ruby Software Installation on Linux systems.

In this context, we shall look into how to install, make use of the MiddleMan, and remove it from your Ubuntu 20.04 LTS.


How to Install MiddleMan on Ubuntu ?

You will need full ruby installation to keep MiddleMan running smoothly on your system.

If you have not yet installed ruby on your system then use the following commands to create a full ruby environment to enable you complete the Installation procedure successfully:

$ sudo apt update
$ sudo apt install ruby-full

Note: MiddleMan requires a minimum of 2.6 versions of ruby's programming language to begin working. The rest of the things are installed along with MiddleMan.


Steps to follow when Installing MiddleMan on Ubuntu 

1. Start the Installation of MiddleMan 

Start by running the below command:

$ gem install middleman

The installation process will begin installing MiddleMan and related ruby gems.

As soon as installed, you will get a success message from the ruby center.


2. Create a MiddleMan Skeleton

Now you are ready, to begin with, your website development process. You will learn how to build a MiddleMan skeleton in the existing directory. Here are the command:

$ middleman init myNewSite

This command creates a new folder and initializes MiddleMan into it.


3. Build MiddleMan

Now We will change the directory and build the middleman with the below commands:

$ cd myNewSite
$ bundle exec middleman build


How to Preview and Deploy MiddleMan after Installation?

Here, you have already produced a successful build of your website. Next, we will make an awesome deployment, but first, we need to make sure that everything is working well.

Use the following build command to run a local server to preview the produced website:

$ bundle exec middleman server

Now the preview website can be seen. It is also ready to be deployed on the server.

Finally, You can access the developed website or application on http://ubuntu.local:4567.


How to Uninstall MiddleMan from your Ubuntu Linux system ?

In any case, if you want to remove MiddleMan from your system simply run the following command:

$ gem remove middleman


[Need assistance in installing any Software on Ubuntu Linux system ? We can help you. ]

This article covers the installation of ruby, middleman, and related gems on Ubuntu 20.04 LTS Linux system. In fact, Middleman is a Ruby-powered static site generator which follows an easy-first approach to building static sites. It has powerful features for maintaining static blogs, like easy tag generation, quick commands for listing categorized articles and pagination.

You can install Middleman with Ruby using this command:

$ gem install middleman

Related Posts