Stardate: 3 days after Father's Day
I'm sleep deprived and exhausted from the amazing Father's Day present my wife and I got this year. With the joys of parenthood, comes the thought that if I don't write something down somewhere, I'll forget it or misplace it. That thought will forever be lost as my mind drifts to more pressing concerns such as "Have I changed the dog's diaper?" or "Have I put the baby outside yet for his potty break?".
The intent of this little molecule in the internet is to create a collection of techincal decisions, questions or software solutions I've come across in my day to day work at Canonical improving Ubuntu system's management. I've been here at Canonical working on the best software distribution ever for about 6 years now, formerly 10+ years in HP Linux & Cloud organization and spent a lot of time trying to soak up information from smart people. Hopefully, I can give background on some of the problems or issues I've encountered so that I don't find myself repeating them again when the coffee cup becomes less than half full.
Experiment 1: Look Ma One-handed
Day one, pelican blog setup, infant in one arm mandatory for style points... Ha. spitup karma just got me for writing that. Okay, back with a change of clothes for pop and kid.
Lesson 1: Don't get cocky. You may think you know what you're doing because you already have two kids, but they will always surprise you.
Today I join the ranks of bloggers, I wanted to use a static blog generator as my intent is to host this blog via github pages. Initially I looked at using Jekyll as that content generator is integrated directly into github's repository settings, but I declined to use Jekyll as it is Ruby-based and I didn't want a bunch of extra gems on my dev system which is primarily a python dev box. I was feeling lazy and didn't want to spin up an LXC for blogging even though that's only a couple commands away. Instead, I decided to use a python-based static content generator and google showed me pelican.
Pelican hit my simple "blog bootstrap me" checklist:
- ✔ looked simple to setup
- ✔ Active community of theme and plugin developers
- ✔ python FTW
Okay, enough verbiage, gotta get dinner together. Here's how I finally pulled the trigger and got my site setup
$ sudo apt install pelican python-markdown
$ mkdir -p blog/mysite
$ cd blog
$ git clone email@example.com:getpelican/pelican-themes.git
$ git clone firstname.lastname@example.org:getpelican/pelican-plugins.git
# Browse themes of interest at [PelicanThemes.com](http://pelicanthemes.com/)
# I chose pelican-stripedhtml5up
$ cd mysite
$ pelican-quickstart # answering all the questions
$ cp -r ../pelican-striped-html5up .
$ cp pelican-striped-html5up/pelicanconf.py .
# Copy needed neighbor plugin
$ cp -r ../pelican-plugins/neighbor .
$ cat <<EOF > content/firstpost.md
Title: First Post
Date: 2017-06-20 19:52
Title: First Post
Jump on in; the water's warm.
$ make devserver
# xdg-open http://localhost:8000
# Iterate on content/firstpost.md
$ cd output
$ git init .
$ git remote add origin https://github.com/<YOUR_GITHUB_USER>/<YOUR_GITHUB_USER>.github.io
$ git push origin