code: function filterLayout(posts) {
        var reLayout = new RegExp(layout, 'i');
  
        return posts.filter(function filterPosts(post) {
          return reLayout.test(post.layout);
        });
      }
docs: filter the posts using a layout if supplied