middleman-breadcrumbs 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +15 -5
- data/lib/middleman-breadcrumbs/breadcrumbs.rb +1 -1
- data/lib/middleman-breadcrumbs/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b09baacf10a30c35128b96f1bb30e256a3caf5
|
4
|
+
data.tar.gz: b83cf71f33a70bc1c3a35009a061256c666a49fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb37bf4b7932f2ff5134547983c45b1ae4ff091e6440f16bdf670a1e3fba3844421f586b54ce8536975332fe0a6f77e21062fbc86b797caf2bc3a40cf1292dbe
|
7
|
+
data.tar.gz: a6d580c797953f545a03a4e43ad018895571d7a466ba961021a5384bbb81c803d78645f7facafaf33a793c9164d4f65bf43ec93b0d66bb9a5c6652a899064fa2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -15,10 +15,18 @@ Put `activate :breadcrumbs` in config.rb (*not* in the `configure :build` block)
|
|
15
15
|
This gem has two configuration options, which are set in the [usual way for Middleman extensions](https://middlemanapp.com/advanced/configuration/#configuring-extensions).
|
16
16
|
|
17
17
|
<dl>
|
18
|
-
<dt
|
19
|
-
|
20
|
-
|
21
|
-
<dd>
|
18
|
+
<dt>
|
19
|
+
<code>:separator</code>
|
20
|
+
</dt>
|
21
|
+
<dd>
|
22
|
+
String that separates the breadcrumb levels. Default is <code> > </code>.
|
23
|
+
</dd>
|
24
|
+
<dt>
|
25
|
+
<code>:wrapper</code>
|
26
|
+
</dt>
|
27
|
+
<dd>
|
28
|
+
Tag name (as a symbol) in which to wrap each breadcrumb level. Default is <code>nil</code>, which means no wrapping.
|
29
|
+
</dd>
|
22
30
|
</dl>
|
23
31
|
|
24
32
|
For example, if you wanted to wrap the breadcrumb levels in `<li>` elements and separate them with bullets, you would put the following in `config.rb`:
|
@@ -30,7 +38,9 @@ activate :breadcrumbs, separator: ' • ', wrapper: :li
|
|
30
38
|
|
31
39
|
## Usage
|
32
40
|
|
33
|
-
In your view files, just call `breadcrumbs(current_page)` to display breadcrumbs.
|
41
|
+
In your view files, just call `breadcrumbs(current_page)` to display breadcrumbs. By default, this will use the separator and wrapper defined in the `config.rb` file.
|
42
|
+
|
43
|
+
If you want to override the separator or wrapper defined in the `config.rb` file, pass the appropriate options to the `breadcrumbs` method:
|
34
44
|
|
35
45
|
```erb
|
36
46
|
<%= breadcrumbs(current_page, separator: ' ||| ', wrapper: :div) %>
|