I’ve had a mysterious broken page on this site for a while - but been too busy to look into it. My Comprehensive Linux Backups with etckeeper & backupninja article has been refusing to load, and returning a weird HTTP 418 Unused status code instead. I finally made the time to figure out the cause.
It turned out that this was being ...
This site has been generated using Pelican 3.3 for over two years - and I finally found some time to upgrade to the current version of Pelican, 3.6.3. This is how I did the upgrade.
I decided to be lazy and do the upgrade in-place, instead of creating a new virtualenv and copying the content & settings over. Luckily, this worked out OK, after a bit of fiddling around.
I also decided, rather cavalierly, to upgrade all the packages ...
We use CentOS VM’s at work to emulate our production environment - and it took me a while to figure out how to get the VirtualBox Guest Additions to build reliably on CentOS 6.4/5. This is what I’ve currently settled on as a reliable method.
First, make sure that you’ve got the kernel headers and tools installed that you need to build stuff:
sudo yum update -y sudo yum install gcc kernel-devel kernel-headers dkms make bzip2 ...
The weather was great this week - crisp and autumnal, with beautiful sunshine all week. It snowed a little on the local mountains and Cypress Mountain has opened for (limited) Skiing already, using the lower temperatures to make lots of extra snow. Whistler also opened this week, along with Grouse.
In other, even ...
To create image thumbnails from a PDF document, run this in a terminal window:
convert -thumbnail x300 -background white -alpha remove input_file.pdf output_thumbnail.png
The parameters to convert do the following things:
|-thumbnail||Similar to -resize, but optimized for speed and strips metadata.|
|x300||Make the thumbnail 300px tall, and whatever width maintains the aspect ratio.|
|-background white||Sets the thumbnail background to white.|
|-alpha remove||Removes the alpha channel from the thumbnail output.|
I had a feature request for automatic figure numbering, like latex. I was revamping this plugin for Pelican 3.3 anyway - and this didn’t seem too hard - so I decided to add it.
So, the Better Figures & Images plugin now supports automatic figure numbering. To enable this for all posts, just add this to your config file:
FIGURE_NUMBERS = True
If you want to enable this per post, just add this to the metadata ...
There are quite a few changes in Pelican 3.3 - most of them minor, but a few which might mean making some changes to your site in order to upgrade. This is what I did to move my site from Pelican 3.2 to 3.3.
The change that had the biggest impact and took the most work was around image linking - caused by a combination of things. I think I was doing it wrong before and things changed in ...
As he’s such a nice guy - and as I’ve just borrowed his tagsort jinja ...