Skip to content


Subversion checkout URL

You can clone with
Download ZIP
LiveReload support for Middleman

Merge pull request #79 from cbetta/js_host_and_port

Add js_host and js_port options
latest commit d5201971e1
@tdreyno tdreyno authored


middleman-livereload is an extension for the Middleman static site generator that adds livereloading functionality.


If you're just getting started, install the middleman gem and generate a new project:

gem install middleman
middleman init MY_PROJECT

If you already have a Middleman project: Add gem "middleman-livereload", "~> 3.4.3" to your Gemfile and run bundle install


activate :livereload

The extension supports a number of options that can be given to the activate statement. Eg:

activate :livereload, apply_js_live: false

:host and :port

Livereload's listener host/port, these options get passed to ::Rack::LiveReload middleware. Defaults:'' and '35729'.

:apply_js_live and :apply_css_live

Whether live reload should attempt to reload javascript / css 'in-place', without complete reload of the page. Both default to true.

:warning: It does not work with @import'ed CSS files or require'd JS files (because of LiveReload not providing enough information regarding dependencies). On those kind of files, a full page reload will be triggered.


Disable Flash polyfil for browsers that support native WebSockets.


Array of patterns for paths that must be ignored. These files will not be injected with the LiveReload script.


CSS bundle file to reload when detecting partial file was modified. By default will reload stylesheets/application.css unless :bundle_file_css option is set.

To opt out set bundle_file_css: nil.

Build & Dependency Status

Gem Version Build Status Dependency Status Code Quality


The official community forum is available at:

Bug Reports

Github Issues are used for managing bug reports and feature requests. If you run into issues, please search the issues and submit new problems:

The best way to get quick responses to your issues and swift fixes to your bugs is to submit detailed bug reports, include test cases and respond to developer questions in a timely manner. Even better, if you know Ruby, you can submit Pull Requests containing Cucumber Features which describe how your feature should work or exploit the bug you are submitting.

How to Run Cucumber Tests

  1. Checkout Repository: git clone
  2. Install Bundler: gem install bundler
  3. Run bundle install inside the project root to install the gem dependencies.
  4. Run test cases: bundle exec rake test


Click here to lend your support to Middleman


Copyright (c) 2010-2013 Thomas Reynolds. MIT Licensed, see LICENSE for details.

Something went wrong with that request. Please try again.