Middleman 3.1


http://beta.middlemanapp.com

https://github.com/middleman/middleman

Ruby 2.0 Support

Side-Loading Frontmatter


  • mytemplate.html.erb
  • mytemplate.html.erb.frontmatter

New Config System

A single class, available as "config"

Before:
set :my_opt, true

After:
config[:my_opt] = true

New Extension SYSTEM


Class-based, Railties-style Extensions

class Middleman::Extensions::MinifyCss < ::Middleman::Extension
  option :compressor, nil, 'Set the CSS compressor to use.'
  option :inline, false, 'Whether to minify CSS inline within HTML files'
  option :ignore, [], 'Patterns to avoid minifying'

  def after_configuration
    chosen_compressor = app.config[:css_compressor] || options[:compressor] || SassCompressor

    # Setup Rack middleware to minify CSS
    app.use Rack, :compressor => chosen_compressor,
                  :ignore => Array(options[:ignore]) + [/\.min\./],
                  :inline => options[:inline]
  end

class SassCompressor; ...; end
class Rack; ...; end
end

Inspector


/__middleman/

Middleman-more

No Longer Needed


All supported features are in Middleman-core

The Middleman gem simply preloads common gems

Et Cetera


  • Dropped Ruby 1.9.2 Support
  • Language-specific i18n templates (mypage.es.html.erb)
  • Build defaults to --clean
  • And more: https://github.com/middleman/middleman/blob/master/CHANGELOG.md

Towards 4.0

  • Disable old-style extensions
  • Isolated Template Context: https://github.com/middleman/middleman/pull/868
  • ActionPack-based templates & helpers
  • Statically compiled installer
  • Rack Server works with File Watcher

Thank you

Middleman 3.1

By tdreyno

Middleman 3.1

  • 2,190