The Development Cycle
Middleman separates your development and production code from the start. This allows you to utilize a bevy of tools (such as Haml, Sass, CoffeeScript, etc.) during development that are unnecessary or undesirable in production. We refer to these environments as The Development Cycle and the Static Site.
The vast majority of time spent using Middleman will be in the Development Cycle.
From the command-line, start the preview web-server from inside your project folder:
$ cd my_project $ bundle exec middleman server
This will start a local web server running at:
You can create and edit files in the
source folder and see the changes
reflected on the preview web-server.
You can stop the preview server from the command-line using Ctrl + C.
middleman without any commands is the same as running
$ bundle exec middleman
Middleman has an extension that will automatically refresh your browser
whenever you edit files in your site. First make sure that you have
middleman-livereload in your
Gemfile. Then simply open your
Your browser will now reload changed pages automatically.
By default, Middleman will reload
stylesheets/all.css when detecting a CSS
import was changed. Use
:livereload_css_target option to set a different
nil to force a full page refresh.