Categories
Technology

Make `jekyll serve` a systemd Service

Recently I have just started to try out Jekyll, but I realized jekyll serve does not come with any script to allow me to run it on system startup. Thus, a simple script is written to make it a systemd script. This script runs jekyll serve on startup.Here it goes:

2 replies on “Make `jekyll serve` a systemd Service”

Thank your for your service file:

I added one line:

Environment=JEKYLL_ENV=’production’

And changed this line:

ExecStart=/usr/local/bin/bundler exec jekyll serve –watch –source “/var/www”

What if you have multiple Jekyll sources on one server, each with their own port designation all being output to different virtual server public_html destinations? What would the script look like to watch all of them, or would you make a new script for each?

Leave a Reply to Jon Griffith Cancel reply