3 minutes
Jekyll on Linux Mint
I have decided to setup an apache web server on my home server. In the past whenever I have configured dev web servers and services I have always ended up going with way more than I need, standing up everything from a simple lamp server to a full sharepoint instance in my basement. While these are a fun time from a development perspective, they are awfully scary to run from a security perspective. This time I decided to go the other way, and expose as few services as possible outside - namely HTML only.
After researching a few options, I settled on Jekyll as this project makes sense to me - pre-compile all of your documents into an HTML website and then post the web site. There are a number of options for doing this - in fact here’s a decent rundown on Mashable. Read more about the Jekyll project here.
If you took a look at it, you will see that it has a lot of awesome features of which I am only using the simplest. I am not interested in someone else hosting or any of the awesome plugins - I just want to have it generate html for my lazy ass.
After reading some of the excellent documentation I realized that I would have to install Ruby, Ruby Gems, and NodeJS on the machine that creates the html pages. For me this is a Linux Mint workstation, as I didn’t want all that cluttering my web server. As such the following commands were necessary before installation.
sudo apt-get install ruby
sudo apt-get install nodejs
Once that was done, I was able to follow the ultra simple installation steps in the Jekyll website.
gem install jekyll
jekyll new test-site
cd test-site
jekyll serve
=> Now browse to http://localhost:4000
It immediately makes a site you can mess with - including template pages that just need to be changed around to suit your needs. If you are feeling frisky and what to install a different theme on your site - you just download the files and dump them right on top - super simple. Here’s the theme site…
After a little playing around with Markdown pages, I settled on Atom as a comfortable editor. Obviously this is highly user specific - feel free to use vim/emacs or whatever hardcore editor you want here (notepad.exe). If you do want to use Atom, the nice folks over at webupd8 team created a repository so us ubuntu/mint folks don’t have to do anything complicated like compile code… Launchpad.net
If you are unsure about the commands to add a repository it goes a little something like this:
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom
That’s all it takes - there is no reason to increase your attack surface by installing plugins and extra services when all you need is a simple web page.