Makzan / I share what I learned

Configure files to copy without middleman building process

While building the new makzan.net on top of middleman site generator. I faced an issue that for certain files, I don’t want middleman to process it during the build process.

For example, I want to copy the README.md without middleman compiling it into HTML file. I also need to copy my HTML5 gamestweet archive and some other stuff without going through the building process.

So I created a folder named public. Then use the following after_build command in config.rb to copy the files in public into the build folder after every clean build.

1
2
3
after_build do |builder|
  FileUtils.cp_r 'public/.', 'build'
end

Published on 2015-09-19. More articles like this:
- Web Technologies

Previous <- New Makzan.net in beta
Next -> Periodically deploying Middleman static site

Want productive tips and web technologies links like this in your inbox each week? Sign up for weekly dispatch each week. No spam ever. Just useful content: