jekyll

Uploading a Jekyll site the easy way with gly

2 min read

So that I didn’t have to upload the site to the hosting by FTP manually after “building” it with Jekyll, I came across, referenced on the Jekyll website, the gly project by Damien MATHIEU, which builds and uploads the site with just the “gly” command, making the process much simpler.

I am currently using Xubuntu, so I will list the steps I used to install Jekyll and gly

Installing Jekyll is as simple as opening a terminal and, with a user that has permission to install applications, typing:

ruby
	sudo apt-get install jekyll

After installing Jekyll I had to install ruby-dev, because building gly failed without this package.

ruby
	sudo apt-get install ruby-dev

Then you just need to run the command given on Damien Mathieu’s page

ruby
	gem install gly --source http://gemcutter.org

If everything goes as expected, gly will be installed.

In the project, the location and login details of the target FTP server must be configured in the _config.yml file.

Example _config.yml file:

ruby
name: site address
markdown: redcarpet
highlighter: pygments
ftp_host: 'ftp server address'
ftp_dir: '/public/www'
ftp_passive: false # optional
ftp_port: 21                  # default 21
ftp_username: 'ftpuser'     # default read from stdin
ftp_password: 'ftppassword' # default read from stdin

Then, from the root of the site’s folder structure, just type “gly”.

#jekyll