added view middleware to gist