Skip to content
Snippets Groups Projects
Commit 0a43dfca authored by fauno's avatar fauno
Browse files

Issue #3 - Permalinks with trailing slash converted to filenames

parent 9241bf90
Branches
Tags
No related merge requests found
...@@ -23,6 +23,8 @@ class PandocGenerator < Generator ...@@ -23,6 +23,8 @@ class PandocGenerator < Generator
FileUtils.mkdir_p(post_path) FileUtils.mkdir_p(post_path)
filename = post.url.gsub(/\.html$/, ".#{output}") filename = post.url.gsub(/\.html$/, ".#{output}")
# Have a filename!
filename = "#{post.url.gsub(/\//, "-")}.#{output}" if filename =~ /\/$/
filename_with_path = File.join(post_path, filename) filename_with_path = File.join(post_path, filename)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment