New ArthurGuy.co.uk website

After a couple of weeks working on the site in my spare time it is finally complete. This site is built using the Laravel framework on the backend and the new bootstrap v3 css framework for the front end, the site is still hosted on Pagodabox but I have fully integrated Amazon S3 storage into the media library in order to improve reliability (Pagodabox's writeable storage doesn't work very well). One of the benefits of using the bootstrap framework is that the site is now fully responsive and works fairly well on mobiles.

One of the features I copied over from the old site was the ajax loading of the pages, coupled with the javascript history api it makes (I believe) for a nicer browsing experience. With the old site I fetched the entire html page and then extracted the bits I needed, this time I went one better and detected the ajax request on the server and only returned the relevant content.

Within Laravel the controllers return their views by passing them through the following function

protected function output(IlluminateViewView $view, $title=null)
{
    if (Request::ajax())
    {
        return Response::json(array(
            'html' => (string)$view,
            'title' => $title
        ));
    }
    else
    {
        return $view;
    }
}

I have placed this function in the base controller and it is called like this from each of the controllers

return $this->output(View::make('blog/index'), 'Blog');

It is possible this could be implemented using Laravel's filters, but this isn't something I have explored yet.

One other change I have been looking forward to making is switching the site over to SSL only. Running a secure site is something I previously advocated but I didn't for purely practical reasons, cost, Pagodabox charge $20 a month for hosting the SSL certificate. After some recent discussions trying to convince a client that SSL doesn't impact SEO I thought it was a bit hypocritical for me to keep on pushing it but not do it myself, hopefully I won't be proved wrong!

Now the site is up and running I can focus on getting some of the smaller bits that I skipped for the launch finished such as sitemaps and rss feeds.

The other thing I am trying out on this site are Google+ comments for some blog posts, not sure if this is going to be a good idea yet, only time will tell.