Posted 3 January 2015
It's high time I started to blog about the things I'm getting into here. For starters, being as it is the new year, I'm going to spend a bit of time making this site a bit more interesting (and up to date). I originally put this site together using some hand written HTML and PHP (using a template made by a website design tool). I've just got it all working with Pico CMS. Pico is a flat-file CMS so there's no database. In fact, Pico is so small there's almost nothing to it. Primarily it renders Markdown into HTML. As the content editor, you just use a text editor to produce the Markdown. Apart from some details, that's pretty much what Pico does.
Pico has a plugin facility, and thankfully a chap called Gilbert Pellegrom wrote an editor plugin. He seems to have moved on from that project (maybe because Pico is a bit fallow?), and left a few bugs and niggles in it, so it's been forked a couple of times (ain't Github great!?). The editor is far from perfect, but it's enough that you can edit content using a browser instead of Notepad++ or Gedit or something. I'm making tweaks and tucks to the editor as I go, when it's got something worth sharing, I'll stick it up on Github.
In a weird way, it's been quite nice getting back to some PHP and hand-edited HTML templates. The Pico code is pretty decent, so it's not hard to code against. The really nice thing is that it has 'hooks' that can be called at the various phases of the request-to-page process. For example, you can intercept the Markdown before it's parsed, or modify the HTML before it's send out to the client, or alter the config when it's loaded in. All that means it's possible to do just about anything you want with a request or the page sent in response to it. I've got another little web-based project in mind which will need a bit of web content, so I'll be getting my hands a bit dirtier which Pico's innards as I work on that. I'll post how I get on with both in the future.
More blog posts:Next Post: Docker