Middleman Bootstrap Navbar
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install middleman-bootstrap-navbar
Middleman >= 3.1
Middleman >= 2.0
The necessary Bootstrap files have to be included separately, they are not part of this gem.
At least the CSS files for the navbar are required, and the JS files for dropdowns and responsive features, if you want to use those in the navbar.
Activate the extensions in
config.rb in your Middleman app:
Set Bootstrap version
This extension needs to know which Bootstrap version you are using, because the navbar HTML looks different in different Bootstrap versions.
If you're using
bootstrap-sass, you're all set because the Boostrap version will be sniffed from that gem's version. Make sure to include the
bootstrap-sass gem before
rails_bootstrap_navbar in your Gemfile though.
If you're not using
bootstrap-sass but include the Bootstrap CSS and JS some other way, set the Bootstrap version when activating the extension:
activate :bootstrap_navbar do |bootstrap_navbar| bootstrap_navbar.bootstrap_version = '4.0.0' end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request