How can I run custom action (eg. copy file to build folder) after middleman built pages?
I want to put
You can use
after_build hook. add following code to
The hook which you can use is written in https://middlemanapp.com/advanced/custom_extensions/ .
Although it is not well documented, it seems that
after_build can use directly in
config.rb, without writing your own extension.
after_build do |builder| src = File.join(config[:source],"Readme.md") dst = File.join(config[:build_dir],"Readme.md") builder.source_paths << File.dirname(__FILE__) builder.copy_file(src,dst) end