From 6e1aa49b3c89e1ee3caac35cabbc3ec7eaf2fbf6 Mon Sep 17 00:00:00 2001
From: "Patrick M. Niedzielski" <patrick@pniedzielski.net>
Date: Fri, 27 Jan 2017 21:03:16 +0000
Subject: [PATCH] Generate Pandoc file with correct title

This patch fixes a bug where the title of a single post will be stored
as `nil` if a title argument is passed to the constructor.  Instead,
the title explicitly passed as an argument should be preferred, with
the YAML front-matter title as a fallback.
---
 lib/jekyll-pandoc-multiple-formats/pandoc_file.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
index 14b698f..894af9f 100644
--- a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
+++ b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
@@ -43,7 +43,7 @@ module Jekyll
         @title = title
       else
         @posts = [posts]
-        @title = posts.data['title'] unless title
+        @title = title or posts.data['title']
       end
 
       @slug  = Utils.slugify(title)
-- 
GitLab