Run Jekyll in Background

Jekyll is a static website generator you can use for developing simple websites. If you are running Jekyll on your desktop, you can view your static website by running a local server. If you want the leave the web server up and running in the background all the time, you can run this command instead.

# normally you run this command
jekyll serve
# running it in the background
jekyll serve > /dev/null 2>&1 &
# add incremental which builds only deltas
jekyll serve --incremental > /dev/null 2>&1 &

To kill the server, run the following.

# find jekyll server process
ps -ef | grep jekyll
# substitute pid# with process id
kill -9 pid#

Serverless Jekyll on AWS

I recently started playing around with Jekyll.

Jekyll is a flat-file CMS that doesn’t need a database. You don’t even need to know HTML to work with it. You just write your content using the Markdown language on any text editor. Once you’re done editing, you run “jekyll build” and Jekyll takes care of the rest. Since Jekyll files are stored on flat-files, you have quite a few choices where to host your website. You can host it on just about any hosting provider. You can have it hosted on Github for free, or better yet can run it as a serverless website on Amazon S3. Serverless meaning, it’s not running on a web server since S3 can host static files. In addition, you can take advantage of Cloudfront for its content distribution to speed up your website, and give it high availability.

So, here’s a demo of Jekyll running on AWS S3 and Cloudfront.

You can learn more about Jekyll by visiting their website.