First thing first
This method was tested on bytii.cloud using Managed Hosting package
and you can also replicate it using any hosting service that have:
and provides you as well with the hosting package
I like to use μ micro Editor
curl https://getmic.ro | bash
Let’s get started!
First login to your cPanel hosting account.
We will need to setup Ruby virtual environment.
In cPanel » software » ruby
Setup an App
Setup new Ruby App
We will configure Ruby version to 2.5,
set working and publishing folders
and click the
App Directorywill be our working folder (virtual environment) and the
App Domain URIfolder will be used for publishing (site folder).
Entering virtual environment
Now we have an App. It will generate a command for entering to virtual environment.
In our case it will be
since jekyll_exp is our working folder.
To run this command we will need to login to our hosting account using ssh.
Use your password, then change directory to your home folder
cd ~ (if you are not already there).
Enter the virtual environment with you app command.
Now you will see in your terminal something like this …
Verifing App is working
If you already installed jekyll this will be quite familiar
Now we can see the
public folder where the ruby app is running.
The result will be published to our publishing folder
If you will surf to
yourdomain.com/blog_exp (as in this example)
You will be able to see something like this:
- The Ruby App is live and working!
Now that we have Ruby virtual environment installed on the cPanel account we can install Jekyll.
Let’s install and deploy Jekyll !
We will run this command from
gem install bundler jekyll bigdecimal
Now we will create a new Jekyll project.
jekyll new blog_dev
Enter its folder.
Now we are able to see Jekyll installed in the
(jekyll_blog:2.5)[gilad@myserver blog_dev]$ ls 404.html about.markdown _config.yml Gemfile Gemfile.lock index.markdown _posts
Next step we want to take is to build and run the Jekyll server.
And then deploy with
JEKYLL_ENV=development jekyll build --baseurl '/blog_exp' --destination ~/jekyll_exp/public --watch --trace
It is important to run this command from within the Jekyll project folder
The environment value
JEKYLL_ENV= allows you choose
We build Jekyll with base url as
/blog_exp and we pull the data from
all changes in Jekyll project folder will be generated to