Getting started
December 1, 2017
To create a blog from scratch, you must first create a blog. This post covers what I did to set things up initially.
First up, installing the basic tools for this site. The shopping list looks like this:
- Linux - got to have an OS
- nano - it’s become a common editor on modern Linuxes and I don’t want to wade into the vi-vs-emacs war yet
- tmux - looks like the right tool for this kind of thing
- Jekyll - seems to be the most popular static site generator currently
- Ruby - cos that’s what Jekyll uses
- Tufte Jekyll theme - got to pick some kind of website style and this one is elegant, streamlined, readable and really easy to use
Linux
Not going into details on this one, other than to say I updated to the latest version The netbook already had an old version of MXLinux on it
$ sudo bash $ cd /etc/apt/source.list.d/ $ nano /etc/apt/*.list (changed wheezy to stretch and mx15 to mx16) $ apt-get update $ apt-get autoremove $ apt-get upgrade (followed a blog post from some kind MXLinux dev about the Y / N answers to the prompts ) $ apt-get dist-upgrade $ reboot
nano
Luckily I get that as the default text editor. However, I did grab a nice config file for markdown syntax highlighting from https://gist.github.com/hekt/1980496 to drop in /usr/share/nano.
For some reason my version of nano doesn’t like hekt’s horizontal rules regexp, so I’ve very slightly tweaked it to escape the underscores:
...[*-\_]...
tmux
A nice easy install this one:
$ apt install tmux
Ruby
Jekyll is written in Ruby, so we need that on the system. However, it appears that although there is a Debian package for Jekyll, which does install Ruby, that doesn’t work so well overall. So instead I ended up installing Ruby first and using Ruby gems to install Jekyll.
$ apt install ruby $ apt install rubygems-integration $ apt install ruby-dev
Jekyll
With Ruby installed, Jekyll can be installed as a Ruby gem (plus a shedload of other dependency gems). This gives us a fairly recent version of Jekyll pretty easily.
The Jekyll docs Check out the Jekyll docs for all the gory details. suggest that the minima and jekyll-feed gems should have been pulled in automatically, but they weren’t for me. No big hassle - just installed them separately when the first “jekyll build” failed.
$ gem install jekyll $ gem install minima $ gem install jekyll-feed
Tufte theme
Since the default Jekyll theme is pretty minimal (clue is in the name) and I’m no great creative force, a better theme was required as the starting point for the site style.
The name Tufte caught my eye, because I’m a big fan of his work and he makes a lot of sense about designing things to work well while looking elegant. Some kind soul has done a Jekyll theme, The Jekyll Tufte theme also includes notes on how to use it based on someone else’s CSS ruleset designed to roughly follow the style used in Tufte’s books. That’s got to be worth trying.
The theme is “installed” by just downloading and unpacking the zip, which then becomes your new Jekyll site. A bit of editing in _config.yml and you’re all set.