As part of the migration of my blog to the Linode, I've cleaned up and restructured the code that powers this blog somewhat and made it available at BLACK for others to use. Right now it is there more as a reason for me to keep improving it than anything else, since it needs some work.. but hopefully it will become useful enough for someone else to use it in the future.

The "engine" revolves around the single function "post". An example of its usage is below:

<?php black\post($query, function ($post, $issingle) { ?>
  <a href="/<?= $post['id'] ?>/"><?= $post['title'] ?></a>
  <br />
  Posted on <?= date('l, F jS Y', $post['timestamp']) ?>
  <br />
  Tags for this post are <?= $post['tags'] ?>
  <br />
  Aaaannnd the post itself:
  <br />
  <?= $post['body'] ?>
  <br />
  <?php if ($issingle): ?>
     Viewing by post id, so insert Disqus commenting stuff here perhaps?
  <?php endif ?>
<?php }) ?>

Added into an existing website template, the provided function will be called for each post you have, printing them all out to the page.

(Maybe) Related posts: