Deployment on a server that doesn't run Ruby

Hello,

I’m pretty much new to Jekyll, and there’s something I don’t quite understand about how to get my site up and running if I opt for shared hosting provided by a traditional web hosting service (instead of GitHub, let’s say).

This is what I’ve found in the Manual Deployment page available on the Jekyll official website:

Most traditional web hosting provider let you upload files to their servers over FTP. To upload a Jekyll site to a web host using FTP, run the jekyll build command and copy the contents of the generated _site folder to the root folder of your hosting account. This is most likely to be the httpdocs or public_html folder on most hosting providers.

I’ve been shopping around for providers, and while the majority of them insist that they are fully WordPress-ready, not much is advertised about their capacity to host static websites.

So my question is: What if a webhosting provider doesn’t run Ruby on its servers, will a site created via Jekyll be able to go live?
In other words, does the _site folder generated through the jekyll build command contain all the files necessary to get the website running?

Thanks!

Andrew

If it does not run ruby, you cannot rebuild the site in the server, you cannot run jekyll build.

But you can upload the generated files (_site directory by default) and update the site whenever you want.

You can build the site in your laptop, and then use rsyinc for example to sync the _site directory (which contains the html generated from Jekyll) with the changes made in your computer.

You should use a one way sync from your computer to de server.

It would work OK if you make changes in just one computer.

Jekyll serve just makes a Jekyll build and then it launches a local http server to serve generated html files from _site.

It listens for changes in source files too, in order to regenerate the html files of updated sources.

You can even update your server automatically each time you edit and save a change.
If you are running Jekyll build --watch in your computer and run a rsync process from time to time o have a sync program that listens for changes.

1 Like

The files Jekyll generates into the _site folder are all static files (things like .html, .css, .js, images, etc.)

If the web host can serve static HTML files (should be all hosts unless they’re a managed Wordpress option) you should be fine. Doesn’t matter if the web host can run Ruby or not… you won’t be running Jekyll on their server. You’ll just be transferring the built files that Jekyll generated when you built the site locally.

1 Like

Thanks for the clarification, ariznaf. Now everything is clear to me!

Andrew

Thanks for the concise explanation, mmistakes! I get it now. I didn’t realize that all the files in the _site folder are static files.

Andrew

That is the wonder of Jekyll and the goal, to deploy modern and beatufull sites using simple tools to build them, easy to maintain and just using plain html5 as base.

If you need some kind of dynamic behaviour you have to implement it using JavaScript and online services.

1 Like