Include original markdown files in build output.

This commit is contained in:
Anna Rose 2016-12-24 17:26:51 -05:00
parent 04822cc426
commit e50152d3d1
No known key found for this signature in database
GPG Key ID: 682893DD0448ED78

View File

@ -0,0 +1,11 @@
# Copy all of the source markdown files directly into the destination.
Jekyll::Hooks.register :site, :post_write do |site|
dest = site.dest
categories = site.config['category_metadata'].each_key do |category|
dir = Dir.new("#{site.source}/_posts/#{category}")
dir.each do |filename|
next unless filename =~ /\.md$/
FileUtils.cp("#{dir.path}/#{filename}", "#{dest}/#{category}/")
end
end
end