1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-25 19:34:48 +01:00
blog/_src/_plugins/rsync_media_folder.rb

9 lines
343 B
Ruby

# http://rentzsch.tumblr.com/post/58936832594/speed-up-jekyll-using-one-weird-trick
module Jekyll
class RsyncMediaFolder < Generator
def generate(site)
system('mkdir -p _site'); # We may be called before _site exists.
system('rsync --archive --delete _src/_media/ _site/media/');
end
end
end