text: const vincent = require('vincent');
  
  exports = module.exports = function (req, res) {
  	
  	const view = new vincent.View(req, res);
  	let locals = res.locals;
  
  	// Set locals
  	locals.section = 'blog';
  	locals.filters = {
  		post: req.params.post,
  	};
  	locals.data = {
  		posts: [],
  	};
  
  	// Load the current post
  	view.on('init', function (next) {
  		
  		const q = vincent.list('Post').model.findOne({
  			state: 'published',
  			slug: locals.filters.post,
  		}).populate('author categories');
  
  		q.exec(function (err, result) {
  			locals.data.post = result;
  			next(err);
  		});
  
  	});
  
  	// Load other posts
  	view.on('init', function (next) {
  		
  		const q = vincent.list('Post').model.find().where('state', 'published').sort('-publishedDate').populate('author').limit(4);
  
  		q.exec(function (err, results) {
  			locals.data.posts = results;
  			next(err);
  		});
  
  	});
  
  	// Render the view
  	view.render('post');
  };
  