title: How to fetch next and previous item of the current one with Mongoose
body: <p>I have a blog. On the individual post page I want to display a link to the previous, and if there is one, next post published in the bottom. The link should be the title of the specific post.</p>
  
  <p>How do I do that the simplest way with Mongoose?</p>
  
  <p>My current controller looks like this:</p>
  
  <pre><code>Post.findOne { slug : req.params.slug }, (err, post) -&gt;
    res.render "blog/show.jade", locals: title: "This post", post: post
  </code></pre>
  
  <p>And the schema looks like this:</p>
  
  <pre><code>PostSchema = new Schema(
    title:
      type: String
      required: true
      index: true
    preamble: String
    body: String
    slug: String
    createdAt: Date
    updatedAt: Date
  )
  </code></pre>