12 lines
421 B
Ruby
12 lines
421 B
Ruby
# 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
|