My personal blog developed on the Slim Framework
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
logs added error page and logging Sep 25, 2012
views Fix code highlighter. Few quick updates. Feb 10, 2015
bundle.php Protect against empty dir. Feb 10, 2015
composer.json Fix code highlighter. Few quick updates. Feb 10, 2015
composer.lock Add simple deploy script. Jan 10, 2013
genposts.php New post about blog rewrite for Slim 2 Jan 14, 2013

I am making the source code of my personal site available publicly in case it helps anybody. It's developed using the Slim Framework.

I am working on a blog post about the rewrite and it should get posted in the next few days finally got posted:


The dependencies are resolved using composer.

If you have PHP 5.4+ installed you can be up and running in 10 seconds +/- 5 seconds for slower typers or copy & pasters.

git clone git://
curl -s | php
php composer.phar update
touch env.local
cd public
php -S

Thats it. Open a browser to and you should see the site as you see at

If you are running a version of PHP 5.3, the setup for nginx and apache are shown below. Either way you will still need to perform the first 5 commands from above.


The root should be pointing to the /your/install/path/ directory of the project.


As shown you will need to create a .htaccess file in the 'public/' folder. I try not to use apache if possible so there isn't one in the repo.

The DocumentRoot should be pointing to the /your/install/path/ directory of the project.

How do I?

Bundle assets

To generate the posts file, compile the less and minify/combine the js run the following command from the project root.

php bundle.php

This command is run on every page load when in local (development) mode.

Add a post

  • Create a new file in views/posts/ with a format of yyyy-m-d-slug.php.
  • The first line in the file needs to be <?/*Post title!*/?>.
  • Run php genposts.php from the project root. (this is automatically ran when in local mode)

This will parse the files in the views/posts/ directory and extract the date, slug and title for each post and generate a new posts.php.

See the posts already in there for examples of functions you can use while writing posts.

What about... ?

This isn't your grandma's blog... read the code and figure it out.


Brian Nesbitt - -


Source code

The code for this project is licensed under the MIT License.

Blog posts

You are free to copy, distribute, modify or display any or all of the blog post material. However you may not use it, in any way, for commercial purposes.

Previous versions

Previously the site was developed against different versions of the Play framework.