How To Split Middleman Site Config Into Multiple Files

Posted by Weston Ganger

I wanted to split up the config file for my middleman site. They dont make it easy for you because they use instance_eval to read the file.

The following technique will allow you to load additional config files correctly.


# config.rb

eval File.read('config/blog.rb')
eval File.read('config/search.rb')
eval File.read('config/proxy_pages.rb')
eval File.read('config/deploy.rb')

Article Topic:Software Development - Web Development

Date:August 24, 2020

Recommended Posts

Contact

604-309-8713
info@solidfoundationwebdev.com

Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected