$app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
// Add the md5() function to Twig scope
$twig->addFilter('md5', new Twig_Filter_Function('md5'));
return $twig;
}));
// Load controllers
include 'controllers/indexController.php';
include 'controllers/treeController.php';
include 'controllers/blobController.php';
include 'controllers/commitController.php';
include 'controllers/statsController.php';
include 'controllers/rssController.php';
// Error handling
$app->error(function (\Exception $e, $code) use ($app) {
return $app['twig']->render('error.twig', array(