Bye Bye, Wordpress. Hello, PieCrust

Since I’m saying goodbye to my hair, I might as well keep up the farewells and move on from Wordpress. WP served me well for years and is still a great piece of software if what you want is something well supported, robust with all the bells and whistles, and has a low barrier to entry. I’m sure there’s quite a bit I’ll miss about WP, most notably the overall convenience of writing posts especially with media attached. I have, however, been feeling for quite awhile that it was time to find something else; not so much a competing product, but something that came at things from a different angle. A few weeks back, I started kicking around the idea of moving the PHP app portion of WP off of my public server and somehow pushing static content from a LAN server hosting WP up to the public server. This would erase any possible exploits in the WP app and make this site more responsive as I would no longer need a database to serve up the content. I tried a few WP plugins that I thought might work but they all felt a bit clunky and, more importantly, I couldn’t get them to do exactly what I wanted; there was always something quirky.

Anywho, a few weeks back I came across Piecrust which had been posted on One Thing Well. I poked around the site, read up on it, and downloaded it. I didn’t get too far with it as is the case with most things I do the first time. But I did keep plugging away at it and finally made some progress with it last night and today after I was finally able to wrap my head around it, and some bugs were fixed to make it usable as it was intended. The last hurdle was getting the RSS feed working. I had to first create a page called feed.html…

---
title: Elebug.net/John
content_type: rss
layout: rss
posts_per_page: 10
single_page: true
format: none
---
for post in pagination.posts
include 'partial_post.xml'
endfor 

…then two templates: a template called rss.html…

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    >

<channel>
    <title>Bye Bye, Wordpress. Hello, PieCrust</title>
    <atom:link href="/john/feed.rss" rel="self" type="application/rss+xml" />
    <link>http://www.elebug.nethttps://johnkastler.net/</link>
    <description>Yet another Systems Engineer notebook</description>
    <language>en</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>http://www.bolt80.com/piecrust</generator>
                </channel>
</rss>

…and another called partial_post.xml…

    <item>
            <title></title>
            <link>http://www.elebug.net</link>
            <pubDate>2011-12-05 16:48:42</pubDate>
            <dc:creator>John</dc:creator>
            <content:encoded></content:encoded>
    </item>

With RSS in place, and a few backend PHP scripts to pull in some external data I went ahead and pushed the new site live. I think all links to old posts are working though some pictures, etc are missing for the time being. I should also take the opportunity to clean up some old post: add tags, add a site search, etc. I already much happier with the CSS as it’s much tighter looking with less clutter and fluff. With Piecrust, I now have a solution that’s clear, nimble, portable, and fast. I’m hoping these pros will outweigh the few things I give up from not using WP.