After a week of testing and development, I’ve finally switched my site over to Jekyll, the static site generator. This allowed me to get rid of PHP and MySQL, which I feel cause too much overhead for a simple site like mine. I also felt Apache had too many features I did not use so I got rid of that and switched to nginx instead. Also note the TLD change, gerardozamudio.mx
The great thing about Jekyll is it’s easy to use and configure. There’s a great installation guide at the official Jekyll site already so I won’t go over that again. Just note you’ll need Node.js and Ruby installed in order for it to work.
First, I created the directory that will hold my new site in my shell user’s home directory:
My site used to run on WordPress so most of the content was stored in the MySQL database. I ran the Jekyll WordPress importer with the following options:
Note that Slackware uses the default PID location of /var/run/mysql/mysql.pid for MySQL so you’ll have to set that. This gave me a nice structured directory with all my posts converted to Markdown complete with YAML Front Matter containing the author, comments, tags, etc. WordPress keeps images in /wp-content/uploads by default, but I made an images directory in the root of my site for simpler management, so a little sed magic fixed that:
I also noticed the posts had been saved with a .markdown extension. Those are not really important in Linux, but I wanted to fix them for my own sanity:
Then it was just a matter of downloading the uploads directory from wp-content in my WordPress site’s root directory into my new Jekyll site’s root directory and renaming it to images.
There are some features of WordPress that Jekyll, being a static site generator, does not implement by default. Luckily I future proofed my site so it was easy to port images as well as HTML used in the posts. I didn’t have many posts that used a featured image so it was simply a matter of adding a new ![Alt text](/images/leading-image.jpg) line to the top of each post.
Speaking of images, I am using the captionss CSS library to easily add a nice looking caption to my images. Again, Jekyll does not offer this out of the box but it was a good excuse to get familiar with Liquid and write my own tag. I didn’t want to bother with surrounding my images with HTML every time I wanted to add a caption so I created a cap.html file in my _includes folder inside my Jekyll site directory with the following contents:
Whenever I want to use an image with a caption, I can just use the following:
WordPress uses the <!--more--> tag to signal post excerpts, and automatically generates a Read more… link. Jekyll does not have this by default, but it can easily be implemented using a loop in the site’s posts index with the splitLiquid filter:
I didn’t bother reinventing the wheel with this one, and shamelessly stole Reyhan Dhuny’s archive.html code to make mine. I only added a hyphen between post names and dates and I was good to go.
Finally, I built the site and put my files in the web server’s directory:
Good old nginx. It’s hard to believe it’s been a decade since this web server came about and it’s certainly matured a lot since then. Development is fast and looks to be stable, so I decided to go with the mainline releases. My main goal was serving plain static content so I did not need any of the extra modules that are built in by default. I created a system user to run the daemon:
I talked about adding a certificate in a previous post, but I decided to take that a step further and switch to ECDSA for my SSL certificate. Unfortunately Gandi does not offer such certificates so I had to move to Comodo in order to get one. I also set up HSTS and PFS to completely get rid of plain HTTP access to the server. At least Qualys seems to think I did a good job. If you look closely at the configure options above you’ll notice I also enabled SPDY, the starting point for HTTP 2.0. Feel free to check it out.
Opera 24 for Linux is finally out! This new version, which is the development build and not stable, includes some new features like Discover, Stash, and an improved Speed Dial and Opera Turbo. You can get a full rundown of the changes by checking the change log.
I haven’t been a fan of Opera since they switched to WebKit (and eventually dumped that for Blink) but I keep the [old 12.16 version from SlackBuilds](http://slackbuilds.org/repository/14.1/network/opera/ “Opera 12.16
SlackBuilds”) around as a third browser just in case.
In the interest of security for readers, I’m glad to announce my site now supports SSL. You should be automatically redirected. For enhanced security around the web, I recommend the EFF’s excellent add-on [HTTPS Everywhere](https://www.eff.org/https-everywhere “HTTPS Everywhere
Steam for Linux has been available for a while now and it’s coming along nicely. It’s easy enough to set up for Slackware using Alien Bob’s steamclient packages. Big Picture Mode is available which means more people are going to want to use a gamepad. I have a wired Xbox 360 controller that I purchased to use with my emulators. Slackware’s kernel already includes the xpad gamepad module so the controller is detected as soon as it’s plugged in.
<zam> what file naming convention would you use for a bunch of books in pdf format? <Soul_keeper> I usually choose a dir name like “junk” and just cp them in there <adaptr> and not even check the exit status of cp <Soul_keeper> exactly <Soul_keeper> nearly impossible to locate/search for one when you need it anyways <adaptr> I always use the sha256 hash of (ISBN, year, publisher, random page from book)