README.md in gretel-3.0.0.beta5 vs README.md in gretel-3.0.0.beta6

- old
+ new

@@ -5,12 +5,11 @@ You define a set of breadcrumbs in the config folder and specify in the view which breadcrumb to use. Gretel also supports [semantic breadcrumbs](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=185417) (those used in Google results). Have fun! And please do write, if you (dis)like it – [lassebunk@gmail.com](mailto:lassebunk@gmail.com). -New in version 3.0 :muscle: ---------------------------- +## New in version 3.0 * Breadcrumbs can now be rendered in different styles like ul- and ol lists, and for use with the [Twitter Bootstrap](http://getbootstrap.com/) framework. See the `:style` option below for more info. * Defining breadcrumbs using `Gretel::Crumbs.layout do ... end` in an initializer has been removed. See below for details on how to upgrade. * The `:show_root_alone` option is now called `:display_single_fragment` and can be used to hide the breadcrumbs when there is only one link, also if it is not the root breadcrumb. The old `:show_root_alone` option is still supported until Gretel version 4.0 and will show a deprecation warning when it's used. @@ -21,12 +20,11 @@ I hope you find these changes as useful as I did – if you have more suggestions, please create an [Issue](https://github.com/lassebunk/gretel/issues) or [Pull Request](https://github.com/lassebunk/gretel/pulls). See below for more info or the [changelog](https://github.com/lassebunk/gretel/blob/master/CHANGELOG.md) for less significant changes. -Installation ------------- +## Installation In your *Gemfile*: ```ruby gem "gretel", "3.0.0.beta5" @@ -36,12 +34,11 @@ ```bash $ bundle install ``` -Example -------- +## Example Start by generating breadcrumbs configuration file: ```bash $ rails generate gretel:install @@ -89,12 +86,11 @@ <a href="/issues">All issues</a> &rsaquo; <span class="current">My Issue</span> </div> ``` -Options -------- +## Options You can pass options to `<%= breadcrumbs %>`, e.g. `<%= breadcrumbs pretext: "You are here: " %>`: Option | Description | Default ------------------------ | -------------------------------------------------------------------------------------------------------------------------- | ------- @@ -125,12 +121,11 @@ Or you can build the breadcrumbs manually for full customization; see below. If you add other widely used styles, please submit a [Pull Request](https://github.com/lassebunk/gretel/pulls) so others can use them too. -More examples -------------- +## More examples In *config/breadcrumbs.rb*: ```ruby # Root crumb @@ -214,12 +209,11 @@ crumb :user do |user| link user_name_for(user), user end ``` -Building the breadcrumbs manually ---------------------------------- +## Building the breadcrumbs manually If you supply a block to the `breadcrumbs` method, it will yield an array with the breadcrumb links so you can build the breadcrumbs HTML manually: ```erb <% breadcrumbs do |links| %> @@ -230,12 +224,11 @@ <% end %> <% end %> <% end %> ``` -Getting the parent breadcrumb ------------------------------ +## Getting the parent breadcrumb If you want to add a link to the parent breadcrumb, you can use the `parent_breadcrumb` view helper. By default it returns a link instance that has the properties `#key`, `#text`, and `#url`. You can supply options like `autoroot: false` etc. @@ -245,12 +238,11 @@ <% parent_breadcrumb do |parent| %> <%= link_to "Back to #{link.text}", link.url %> <% end %> ``` -Nice to know ------------- +## Nice to know ### Access to view methods When configuring breadcrumbs inside a `crumb :xx do ... end` block, you have access to all methods that are normally accessible in the view where the breadcrumbs are inserted. This includes your view helpers, `params`, `request`, etc. @@ -271,12 +263,11 @@ You can apply trails to select links by adding a simple JS selector (`js-append-trail` or another you choose), and after each page load it hides the trail from the URL, so the server sees it but the users don't. Check out the gem [here](https://github.com/lassebunk/gretel-trails). -Upgrading from version 2.0 or below ------------------------------------ +## Upgrading from version 2.0 or below Instead of using the initializer that in Gretel version 2.0 and below required restarting the application after breadcrumb configuration changes, the configuration of the breadcrumbs is now loaded from `config/breadcrumbs.rb` (and `config/breadcrumbs/*.rb` if you want to split your breadcrumbs configuration across multiple files). In the Rails development environment, these files are automatically reloaded when changed. Using the initializer (e.g. `config/initializers/breadcrumbs.rb`) was deprecated in Gretel version 2.1.0 and removed in version 3.0. It raises an error if you try to use it. @@ -299,22 +290,19 @@ end ``` in `config/breadcrumbs.rb`. -Documentation -------------- +## Documentation * [Full documentation](http://rubydoc.info/gems/gretel) * [Changelog](https://github.com/lassebunk/gretel/blob/master/CHANGELOG.md) -Versioning ----------- +## Versioning Follows [semantic versioning](http://semver.org/). -Contributors ------------- +## Contributors * [See the list of contributors](https://github.com/lassebunk/gretel/graphs/contributors) Copyright (c) 2010-2013 [Lasse Bunk](http://lassebunk.dk), released under the MIT license