diff --git a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
index f60ca1a5c0648ad30105affb2215125a1615c2ce..4e2c8cc6e9dd3d06b9889ba91add6af15d622441 100644
--- a/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
+++ b/lib/jekyll-pandoc-multiple-formats/pandoc_file.rb
@@ -41,12 +41,14 @@ module Jekyll
         raise ArgumentError.new "'title' argument is required for multipost file" unless title
 
         @title = title
+        @slug = Utils.slugify(@title)
       else
         @posts = [posts]
         @title = posts.data['title'] unless title
+        @slug  = posts.data['slug']
       end
 
-      @slug = Utils.slugify(@title)
+      self
     end
 
     def path