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

📬 Subscribe to Makzan’s Weekly Dispatch

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:

What to expect: If you wish to withdraw your consent and stop hearing from us, simply click the unsubscribe link at the bottom of every email we send or contact us at mak@makzan.net. We value and respect your personal data and privacy. To view our privacy policy, please visit our website. By submitting this form, you agree that we may process your information in accordance with these terms.