Include original markdown files in build output.
This commit is contained in:
parent
04822cc426
commit
e50152d3d1
11
_plugins/markdown_and_sign.rb
Normal file
11
_plugins/markdown_and_sign.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user