middleman-pagegroups 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -14
- data/README.md +4 -1
- data/Rakefile +5 -1
- data/documentation_project/Gemfile +1 -1
- data/documentation_project/config.rb +2 -2
- data/documentation_project/source/partials/_yard_config.erb +12 -12
- data/documentation_project/source/partials/_yard_helpers.erb +7 -7
- data/documentation_project/source/partials/_yard_helpers_css.erb +10 -10
- data/documentation_project/source/partials/_yard_helpers_extended.erb +1 -1
- data/documentation_project/source/partials/_yard_resources.erb +59 -13
- data/features/support/env.rb +0 -14
- data/lib/middleman-pagegroups/extension.rb +21 -6
- data/lib/middleman-pagegroups/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acb71906ad3df771231d5385e851355c8533e744
|
4
|
+
data.tar.gz: 7531bd3c08f7d112a4d09fa8cae6492c8c3a46d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ae32afedad7aaea8003d1a488d3b13660787ce976fe78b522ea75f15fe0237b3175bd5af2c1de1ac826ed00a523df8abc4c6cafcc4bed4bff2d494566565ac0
|
7
|
+
data.tar.gz: da136a46340fa49c9394887389f9ec3a8b4cba73a495d9454bd0fe74d65e0a2d6c6e8d76145da9e04c21bb155726eb90dcce2d1a22578c2103317a22acac3cda
|
data/CHANGELOG.md
CHANGED
@@ -1,26 +1,41 @@
|
|
1
1
|
middleman-pagegroups change log
|
2
2
|
===============================
|
3
3
|
|
4
|
-
- Version 1.0.
|
4
|
+
- Version 1.0.7 / 2018-April-25
|
5
5
|
|
6
|
-
-
|
7
|
-
- Updated Cucumber test for version 1.0.5 fixture changes.
|
8
|
-
- Added API documentation to project root, and link to it from readme.
|
6
|
+
- Correct the version to non-wip.
|
9
7
|
|
8
|
+
- Version 1.0.7.wip / 2018-April-25
|
10
9
|
|
11
|
-
-
|
10
|
+
- - Bump to version 1.0.7.
|
11
|
+
- Added a convenient `legitimate?` field to each resource.
|
12
|
+
- Fixed some source code formatting.
|
13
|
+
- Added a `rake testq` task to squelch annoying errout, and removed the old
|
14
|
+
customer formatter with deprecated methods.
|
15
|
+
- Updated the documentation project.
|
16
|
+
- Updated README with better Github link. No version bump.
|
17
|
+
- Version 1.0.6 changes:
|
18
|
+
- Fixed bad documentation project. No idea how this was missed.
|
19
|
+
- Updated Cucumber test for version 1.0.5 fixture changes.
|
20
|
+
- Added API documentation to project root, and link to it from readme.
|
12
21
|
|
13
|
-
|
14
|
-
- Updated fixture application to use deeply nested folders.
|
22
|
+
- Version 1.0.5 / 2016-June-29
|
15
23
|
|
16
|
-
- Version 1.0.
|
24
|
+
- Version 1.0.5 changes:
|
25
|
+
- Fix using page order prefixes for nested folders.
|
26
|
+
- Updated fixture application to use deeply nested folders.
|
17
27
|
|
18
|
-
|
19
|
-
- Added capybara development dependency to fix broken testing.
|
20
|
-
- Sample project now refers to non-local file.
|
28
|
+
- Version 1.0.4 / 2016-May-15
|
21
29
|
|
30
|
+
- Version 1.0.4 Changes:
|
31
|
+
- Better Rakefile for version management.
|
32
|
+
- Added capybara development dependency to fix broken testing.
|
33
|
+
- Sample project now refers to non-local file.
|
34
|
+
- Version 1.0.4
|
35
|
+
- Very minor Rakefile cleanup.
|
36
|
+
- tbd
|
22
37
|
|
23
|
-
- Version 1.0.3 / 2016-May-
|
38
|
+
- Version 1.0.3 / 2016-May-10
|
24
39
|
|
25
40
|
- Support ordering on directories; documentation
|
26
41
|
- Replaced Middleman's `resource.parent` with fixed version that respects
|
@@ -32,14 +47,14 @@ middleman-pagegroups change log
|
|
32
47
|
- Added significant release-related functionality to the Rakefile.
|
33
48
|
Rakefile now generates the change log.
|
34
49
|
|
35
|
-
- Version 1.0.2 / 2016-May-
|
50
|
+
- Version 1.0.2 / 2016-May-09
|
36
51
|
|
37
52
|
- Bump to v1.0.2 to fix files that don't have a page order associated with them
|
38
53
|
- Cleanup
|
39
54
|
- Cleanup README.
|
40
55
|
- Remove .gem that should not have been committed.
|
41
56
|
|
42
|
-
- Version 1.0.1 / 2016-May-
|
57
|
+
- Version 1.0.1 / 2016-May-09
|
43
58
|
|
44
59
|
- Bump to v1.0.1 to repair bad sample project
|
45
60
|
- Added RubyGems badge to README
|
data/README.md
CHANGED
@@ -15,7 +15,10 @@ middleman-pagegroups readme
|
|
15
15
|
Documentation One-Pager:
|
16
16
|
------------------------
|
17
17
|
|
18
|
-
|
18
|
+
Have a sneak peak at the API without installing anything.
|
19
|
+
|
20
|
+
- [On Github](http://htmlpreview.github.io/?https://github.com/middlemac/middleman-pagegroups/blob/master/README_doc.html)
|
21
|
+
- [Locally](README_doc.html)
|
19
22
|
|
20
23
|
|
21
24
|
Install the Gem
|
data/Rakefile
CHANGED
@@ -17,7 +17,11 @@ task :default => :test
|
|
17
17
|
# Perform Cucumber testing.
|
18
18
|
###############################################################################
|
19
19
|
Cucumber::Rake::Task.new(:test, 'Features that must pass') do |task|
|
20
|
-
task.cucumber_opts = '--require features --color --tags ~@wip --strict --format
|
20
|
+
task.cucumber_opts = '--require features --color --tags ~@wip --strict --format pretty'
|
21
|
+
end
|
22
|
+
|
23
|
+
Cucumber::Rake::Task.new(:testq, 'Features that must pass') do |task|
|
24
|
+
task.cucumber_opts = '--require features --color --tags ~@wip --strict --format pretty 2>/dev/null'
|
21
25
|
end
|
22
26
|
|
23
27
|
|
@@ -9,7 +9,7 @@ gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
|
|
9
9
|
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
|
10
10
|
|
11
11
|
# Middleman Gems
|
12
|
-
gem 'middleman-pagegroups', '~> 1.0.
|
12
|
+
gem 'middleman-pagegroups', '~> 1.0.7'
|
13
13
|
gem 'middleman', '~> 4.1.7'
|
14
14
|
gem 'middleman-syntax'
|
15
15
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<div class="method_details first">
|
10
10
|
<h3 class="signature first" id="options[:extend_page_class]=-instance_method">
|
11
11
|
|
12
|
-
|
12
|
+
#<strong>options[:extend_page_class]=</strong>(value) ⇒ <tt>Boolean</tt>
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -70,7 +70,7 @@ to include simple <code>group</code> and <code>page_name</code> for each resourc
|
|
70
70
|
<div class="method_details ">
|
71
71
|
<h3 class="signature " id="options[:nav_breadcrumbs_alt_class]=-instance_method">
|
72
72
|
|
73
|
-
|
73
|
+
#<strong>options[:nav_breadcrumbs_alt_class]=</strong>(value) ⇒ <tt>String</tt>
|
74
74
|
|
75
75
|
|
76
76
|
|
@@ -131,7 +131,7 @@ containing element.</p>
|
|
131
131
|
<div class="method_details ">
|
132
132
|
<h3 class="signature " id="options[:nav_breadcrumbs_alt_label]=-instance_method">
|
133
133
|
|
134
|
-
|
134
|
+
#<strong>options[:nav_breadcrumbs_alt_label]=</strong>(value) ⇒ <tt>String</tt>
|
135
135
|
|
136
136
|
|
137
137
|
|
@@ -192,7 +192,7 @@ containing element.</p>
|
|
192
192
|
<div class="method_details ">
|
193
193
|
<h3 class="signature " id="options[:nav_breadcrumbs_class]=-instance_method">
|
194
194
|
|
195
|
-
|
195
|
+
#<strong>options[:nav_breadcrumbs_class]=</strong>(value) ⇒ <tt>String</tt>
|
196
196
|
|
197
197
|
|
198
198
|
|
@@ -253,7 +253,7 @@ containing element.</p>
|
|
253
253
|
<div class="method_details ">
|
254
254
|
<h3 class="signature " id="options[:nav_brethren_class]=-instance_method">
|
255
255
|
|
256
|
-
|
256
|
+
#<strong>options[:nav_brethren_class]=</strong>(value) ⇒ <tt>String</tt>
|
257
257
|
|
258
258
|
|
259
259
|
|
@@ -314,7 +314,7 @@ containing element.</p>
|
|
314
314
|
<div class="method_details ">
|
315
315
|
<h3 class="signature " id="options[:nav_brethren_index_class]=-instance_method">
|
316
316
|
|
317
|
-
|
317
|
+
#<strong>options[:nav_brethren_index_class]=</strong>(value) ⇒ <tt>String</tt>
|
318
318
|
|
319
319
|
|
320
320
|
|
@@ -375,7 +375,7 @@ containing element.</p>
|
|
375
375
|
<div class="method_details ">
|
376
376
|
<h3 class="signature " id="options[:nav_legitimate_children_class]=-instance_method">
|
377
377
|
|
378
|
-
|
378
|
+
#<strong>options[:nav_legitimate_children_class]=</strong>(value) ⇒ <tt>String</tt>
|
379
379
|
|
380
380
|
|
381
381
|
|
@@ -436,7 +436,7 @@ containing element.</p>
|
|
436
436
|
<div class="method_details ">
|
437
437
|
<h3 class="signature " id="options[:nav_prev_next_class]=-instance_method">
|
438
438
|
|
439
|
-
|
439
|
+
#<strong>options[:nav_prev_next_class]=</strong>(value) ⇒ <tt>String</tt>
|
440
440
|
|
441
441
|
|
442
442
|
|
@@ -497,7 +497,7 @@ containing element.</p>
|
|
497
497
|
<div class="method_details ">
|
498
498
|
<h3 class="signature " id="options[:nav_prev_next_label_next]=-instance_method">
|
499
499
|
|
500
|
-
|
500
|
+
#<strong>options[:nav_prev_next_label_next]=</strong>(value) ⇒ <tt>String</tt>
|
501
501
|
|
502
502
|
|
503
503
|
|
@@ -558,7 +558,7 @@ containing element.</p>
|
|
558
558
|
<div class="method_details ">
|
559
559
|
<h3 class="signature " id="options[:nav_prev_next_label_prev]=-instance_method">
|
560
560
|
|
561
|
-
|
561
|
+
#<strong>options[:nav_prev_next_label_prev]=</strong>(value) ⇒ <tt>String</tt>
|
562
562
|
|
563
563
|
|
564
564
|
|
@@ -619,7 +619,7 @@ containing element.</p>
|
|
619
619
|
<div class="method_details ">
|
620
620
|
<h3 class="signature " id="options[:nav_toc_index_class]=-instance_method">
|
621
621
|
|
622
|
-
|
622
|
+
#<strong>options[:nav_toc_index_class]=</strong>(value) ⇒ <tt>String</tt>
|
623
623
|
|
624
624
|
|
625
625
|
|
@@ -680,7 +680,7 @@ containing element.</p>
|
|
680
680
|
<div class="method_details ">
|
681
681
|
<h3 class="signature " id="options[:strip_file_prefixes]=-instance_method">
|
682
682
|
|
683
|
-
|
683
|
+
#<strong>options[:strip_file_prefixes]=</strong>(value) ⇒ <tt>Boolean</tt>
|
684
684
|
|
685
685
|
|
686
686
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class="method_details first">
|
11
11
|
<h3 class="signature first" id="nav_breadcrumbs-instance_method">
|
12
12
|
|
13
|
-
|
13
|
+
#<strong>nav_breadcrumbs</strong>(locals = {}) ⇒ <tt>String</tt>
|
14
14
|
|
15
15
|
|
16
16
|
|
@@ -95,7 +95,7 @@ element.</p>
|
|
95
95
|
<div class="method_details ">
|
96
96
|
<h3 class="signature " id="nav_breadcrumbs_alt-instance_method">
|
97
97
|
|
98
|
-
|
98
|
+
#<strong>nav_breadcrumbs_alt</strong>(locals = {}) ⇒ <tt>String</tt>
|
99
99
|
|
100
100
|
|
101
101
|
|
@@ -194,7 +194,7 @@ that means “Current page.”</p>
|
|
194
194
|
<div class="method_details ">
|
195
195
|
<h3 class="signature " id="nav_brethren-instance_method">
|
196
196
|
|
197
|
-
|
197
|
+
#<strong>nav_brethren</strong>(locals = {}) ⇒ <tt>String</tt>
|
198
198
|
|
199
199
|
|
200
200
|
|
@@ -295,7 +295,7 @@ then this resource’s brethren will be listed.</p>
|
|
295
295
|
<div class="method_details ">
|
296
296
|
<h3 class="signature " id="nav_brethren_index-instance_method">
|
297
297
|
|
298
|
-
|
298
|
+
#<strong>nav_brethren_index</strong>(locals = {}) ⇒ <tt>String</tt>
|
299
299
|
|
300
300
|
|
301
301
|
|
@@ -394,7 +394,7 @@ then this resource’s brethren will be listed.</p>
|
|
394
394
|
<div class="method_details ">
|
395
395
|
<h3 class="signature " id="nav_legitimate_children-instance_method">
|
396
396
|
|
397
|
-
|
397
|
+
#<strong>nav_legitimate_children</strong>(locals = {}) ⇒ <tt>String</tt>
|
398
398
|
|
399
399
|
|
400
400
|
|
@@ -495,7 +495,7 @@ then this resource’s children will be listed.</p>
|
|
495
495
|
<div class="method_details ">
|
496
496
|
<h3 class="signature " id="nav_prev_next-instance_method">
|
497
497
|
|
498
|
-
|
498
|
+
#<strong>nav_prev_next</strong>(locals = {}) ⇒ <tt>String</tt>
|
499
499
|
|
500
500
|
|
501
501
|
|
@@ -607,7 +607,7 @@ label that means “Next page.”</p>
|
|
607
607
|
<div class="method_details ">
|
608
608
|
<h3 class="signature " id="nav_toc_index-instance_method">
|
609
609
|
|
610
|
-
|
610
|
+
#<strong>nav_toc_index</strong>(locals = {}) ⇒ <tt>String</tt>
|
611
611
|
|
612
612
|
|
613
613
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class="method_details first">
|
11
11
|
<h3 class="signature first" id="nav_breadcrumbs_alt_class-instance_method">
|
12
12
|
|
13
|
-
|
13
|
+
#<strong>nav_breadcrumbs_alt_class</strong> ⇒ <tt>String</tt>
|
14
14
|
|
15
15
|
|
16
16
|
|
@@ -61,7 +61,7 @@ can be changed using the extension options.</p>
|
|
61
61
|
<div class="method_details ">
|
62
62
|
<h3 class="signature " id="nav_breadcrumbs_alt_label-instance_method">
|
63
63
|
|
64
|
-
|
64
|
+
#<strong>nav_breadcrumbs_alt_label</strong> ⇒ <tt>String</tt>
|
65
65
|
|
66
66
|
|
67
67
|
|
@@ -112,7 +112,7 @@ can be changed using the extension options.</p>
|
|
112
112
|
<div class="method_details ">
|
113
113
|
<h3 class="signature " id="nav_breadcrumbs_class-instance_method">
|
114
114
|
|
115
|
-
|
115
|
+
#<strong>nav_breadcrumbs_class</strong> ⇒ <tt>String</tt>
|
116
116
|
|
117
117
|
|
118
118
|
|
@@ -163,7 +163,7 @@ can be changed using the extension options.</p>
|
|
163
163
|
<div class="method_details ">
|
164
164
|
<h3 class="signature " id="nav_brethren_class-instance_method">
|
165
165
|
|
166
|
-
|
166
|
+
#<strong>nav_brethren_class</strong> ⇒ <tt>String</tt>
|
167
167
|
|
168
168
|
|
169
169
|
|
@@ -214,7 +214,7 @@ can be changed using the extension options.</p>
|
|
214
214
|
<div class="method_details ">
|
215
215
|
<h3 class="signature " id="nav_brethren_index_class-instance_method">
|
216
216
|
|
217
|
-
|
217
|
+
#<strong>nav_brethren_index_class</strong> ⇒ <tt>String</tt>
|
218
218
|
|
219
219
|
|
220
220
|
|
@@ -265,7 +265,7 @@ can be changed using the extension options.</p>
|
|
265
265
|
<div class="method_details ">
|
266
266
|
<h3 class="signature " id="nav_legitimate_children_class-instance_method">
|
267
267
|
|
268
|
-
|
268
|
+
#<strong>nav_legitimate_children_class</strong> ⇒ <tt>String</tt>
|
269
269
|
|
270
270
|
|
271
271
|
|
@@ -316,7 +316,7 @@ can be changed using the extension options.</p>
|
|
316
316
|
<div class="method_details ">
|
317
317
|
<h3 class="signature " id="nav_prev_next_class-instance_method">
|
318
318
|
|
319
|
-
|
319
|
+
#<strong>nav_prev_next_class</strong> ⇒ <tt>String</tt>
|
320
320
|
|
321
321
|
|
322
322
|
|
@@ -367,7 +367,7 @@ can be changed using the extension options.</p>
|
|
367
367
|
<div class="method_details ">
|
368
368
|
<h3 class="signature " id="nav_prev_next_label_next-instance_method">
|
369
369
|
|
370
|
-
|
370
|
+
#<strong>nav_prev_next_label_next</strong> ⇒ <tt>String</tt>
|
371
371
|
|
372
372
|
|
373
373
|
|
@@ -418,7 +418,7 @@ can be changed using the extension options.</p>
|
|
418
418
|
<div class="method_details ">
|
419
419
|
<h3 class="signature " id="nav_prev_next_label_prev-instance_method">
|
420
420
|
|
421
|
-
|
421
|
+
#<strong>nav_prev_next_label_prev</strong> ⇒ <tt>String</tt>
|
422
422
|
|
423
423
|
|
424
424
|
|
@@ -469,7 +469,7 @@ can be changed using the extension options.</p>
|
|
469
469
|
<div class="method_details ">
|
470
470
|
<h3 class="signature " id="nav_toc_index_class-instance_method">
|
471
471
|
|
472
|
-
|
472
|
+
#<strong>nav_toc_index_class</strong> ⇒ <tt>String</tt>
|
473
473
|
|
474
474
|
|
475
475
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class="method_details first">
|
11
11
|
<h3 class="signature first" id="resource.breadcrumbs-instance_method">
|
12
12
|
|
13
|
-
|
13
|
+
#<strong>resource.breadcrumbs</strong> ⇒ <tt>Array<Sitemap::Resource></tt>
|
14
14
|
|
15
15
|
|
16
16
|
|
@@ -50,7 +50,7 @@ resources.</p>
|
|
50
50
|
<div class="method_details ">
|
51
51
|
<h3 class="signature " id="resource.brethren-instance_method">
|
52
52
|
|
53
|
-
|
53
|
+
#<strong>resource.brethren</strong> ⇒ <tt>Array<Sitemap::Resource></tt>
|
54
54
|
|
55
55
|
|
56
56
|
|
@@ -100,7 +100,7 @@ resources.</p>
|
|
100
100
|
<div class="method_details ">
|
101
101
|
<h3 class="signature " id="resource.brethren_next-instance_method">
|
102
102
|
|
103
|
-
|
103
|
+
#<strong>resource.brethren_next</strong> ⇒ <tt>Sitemap::Resource</tt>
|
104
104
|
|
105
105
|
|
106
106
|
|
@@ -141,7 +141,7 @@ the next sibling.</p>
|
|
141
141
|
<div class="method_details ">
|
142
142
|
<h3 class="signature " id="resource.brethren_previous-instance_method">
|
143
143
|
|
144
|
-
|
144
|
+
#<strong>resource.brethren_previous</strong> ⇒ <tt>Sitemap::Resource</tt>
|
145
145
|
|
146
146
|
|
147
147
|
|
@@ -182,7 +182,7 @@ the previous sibling.</p>
|
|
182
182
|
<div class="method_details ">
|
183
183
|
<h3 class="signature " id="resource.group_count-instance_method">
|
184
184
|
|
185
|
-
|
185
|
+
#<strong>resource.group_count</strong> ⇒ <tt>Integer</tt>
|
186
186
|
|
187
187
|
|
188
188
|
|
@@ -218,13 +218,59 @@ this page’s current group.</p>
|
|
218
218
|
|
219
219
|
</ul>
|
220
220
|
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div class="method_details ">
|
225
|
+
<h3 class="signature " id="resource.legitimate?-instance_method">
|
226
|
+
|
227
|
+
#<strong>resource.legitimate?</strong> ⇒ <tt>Boolean</tt>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</h3><div class="docstring">
|
234
|
+
<div class="discussion">
|
235
|
+
<p>Indicates whether or not a page is “legitimate” in
|
236
|
+
terms of automatic navigation, based in:</p>
|
237
|
+
|
238
|
+
<ul>
|
239
|
+
<li>The resource has a sort order and isn’t zero.</li>
|
240
|
+
<li>The resource isn’t ignored.</li>
|
241
|
+
</ul>
|
242
|
+
|
243
|
+
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
<div class="tags">
|
247
|
+
|
248
|
+
<p class="tag_title">Returns:</p>
|
249
|
+
<ul class="return">
|
250
|
+
|
251
|
+
<li>
|
252
|
+
|
253
|
+
|
254
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
—
|
259
|
+
<div class='inline'><p>Returns <code>true</code> if this pages
|
260
|
+
participates in automatic navigation features.</p>
|
261
|
+
</div>
|
262
|
+
|
263
|
+
</li>
|
264
|
+
|
265
|
+
</ul>
|
266
|
+
|
221
267
|
</div>
|
222
268
|
</div>
|
223
269
|
|
224
270
|
<div class="method_details ">
|
225
271
|
<h3 class="signature " id="resource.legitimate_children-instance_method">
|
226
272
|
|
227
|
-
|
273
|
+
#<strong>resource.legitimate_children</strong> ⇒ <tt>Array<Sitemap::Resource></tt>
|
228
274
|
|
229
275
|
|
230
276
|
|
@@ -274,7 +320,7 @@ resources.</p>
|
|
274
320
|
<div class="method_details ">
|
275
321
|
<h3 class="signature " id="resource.navigator_eligible?-instance_method">
|
276
322
|
|
277
|
-
|
323
|
+
#<strong>resource.navigator_eligible?</strong> ⇒ <tt>Boolean</tt>
|
278
324
|
|
279
325
|
|
280
326
|
|
@@ -309,7 +355,7 @@ use of <code>:navigator => false</code> in its front matter.</li>
|
|
309
355
|
|
310
356
|
|
311
357
|
—
|
312
|
-
<div class='inline'><p>Returns <code>true</code> if this
|
358
|
+
<div class='inline'><p>Returns <code>true</code> if this page is
|
313
359
|
eligible for a previous/next page control.</p>
|
314
360
|
</div>
|
315
361
|
|
@@ -323,7 +369,7 @@ eligible for a previous/next page control.</p>
|
|
323
369
|
<div class="method_details ">
|
324
370
|
<h3 class="signature " id="resource.page_group-instance_method">
|
325
371
|
|
326
|
-
|
372
|
+
#<strong>resource.page_group</strong> ⇒ <tt>String</tt>
|
327
373
|
|
328
374
|
|
329
375
|
|
@@ -364,7 +410,7 @@ conditionals.</p>
|
|
364
410
|
<div class="method_details ">
|
365
411
|
<h3 class="signature " id="resource.page_name-instance_method">
|
366
412
|
|
367
|
-
|
413
|
+
#<strong>resource.page_name</strong> ⇒ <tt>String</tt>
|
368
414
|
|
369
415
|
|
370
416
|
|
@@ -405,7 +451,7 @@ Useful for assigning classes, etc.</p>
|
|
405
451
|
<div class="method_details ">
|
406
452
|
<h3 class="signature " id="resource.page_sequence-instance_method">
|
407
453
|
|
408
|
-
|
454
|
+
#<strong>resource.page_sequence</strong> ⇒ <tt>Integer</tt>, <tt>Nil</tt>
|
409
455
|
|
410
456
|
|
411
457
|
|
@@ -448,7 +494,7 @@ this resource among its brethren.</p>
|
|
448
494
|
<div class="method_details ">
|
449
495
|
<h3 class="signature " id="resource.parent-instance_method">
|
450
496
|
|
451
|
-
|
497
|
+
#<strong>resource.parent</strong> ⇒ <tt>Sitemap::Resource</tt>
|
452
498
|
|
453
499
|
|
454
500
|
|
@@ -491,7 +537,7 @@ the resource’s parent.</p>
|
|
491
537
|
<div class="method_details ">
|
492
538
|
<h3 class="signature " id="resource.sort_order-instance_method">
|
493
539
|
|
494
|
-
|
540
|
+
#<strong>resource.sort_order</strong> ⇒ <tt>Integer</tt>
|
495
541
|
|
496
542
|
|
497
543
|
|
data/features/support/env.rb
CHANGED
@@ -4,17 +4,3 @@ ENV['TEST'] = 'true'
|
|
4
4
|
require 'middleman'
|
5
5
|
require 'middleman-core/step_definitions'
|
6
6
|
require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-pagegroups')
|
7
|
-
|
8
|
-
|
9
|
-
require 'cucumber/formatter/pretty'
|
10
|
-
class QuietFormatter < Cucumber::Formatter::Pretty
|
11
|
-
def initialize(runtime, io, options)
|
12
|
-
$stderr = File.new( '/dev/null', 'w' )
|
13
|
-
super(runtime, io, options)
|
14
|
-
end
|
15
|
-
|
16
|
-
def after_features(features)
|
17
|
-
$stderr = STDOUT
|
18
|
-
super(features)
|
19
|
-
end
|
20
|
-
end
|
@@ -29,7 +29,7 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
29
29
|
option :nav_toc_index_class, nil, 'Default css class for the nav_toc_index helper/partial.'
|
30
30
|
|
31
31
|
# @!group Extension Configuration
|
32
|
-
|
32
|
+
|
33
33
|
# @!attribute [rw] options[:strip_file_prefixes]=
|
34
34
|
# If `true` leading numbers used for sorting files will be removed for
|
35
35
|
# presentation purposes. This makes it possible to neatly organize your
|
@@ -151,7 +151,7 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
151
151
|
end
|
152
152
|
|
153
153
|
|
154
|
-
|
154
|
+
#--------------------------------------------------------
|
155
155
|
# Add our own resource methods to each resource in the
|
156
156
|
# site map.
|
157
157
|
# @!visibility private
|
@@ -261,7 +261,7 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
261
261
|
return nil
|
262
262
|
else
|
263
263
|
self.siblings
|
264
|
-
.find_all { |p| p.
|
264
|
+
.find_all { |p| p.legitimate? }
|
265
265
|
.push(self)
|
266
266
|
.sort_by { |p| p.sort_order }
|
267
267
|
.find_index(self) + 1
|
@@ -284,7 +284,7 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
284
284
|
#--------------------------------------------------------
|
285
285
|
def resource.brethren
|
286
286
|
self.siblings
|
287
|
-
.find_all { |p| p.
|
287
|
+
.find_all { |p| p.legitimate? && p != self }
|
288
288
|
.sort_by { |p| p.sort_order }
|
289
289
|
end
|
290
290
|
|
@@ -329,7 +329,7 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
329
329
|
# use of `:navigator => false` in its front matter.
|
330
330
|
# * This page has a `sort_order`.
|
331
331
|
#
|
332
|
-
# @return (Boolean) Returns `true` if this
|
332
|
+
# @return (Boolean) Returns `true` if this page is
|
333
333
|
# eligible for a previous/next page control.
|
334
334
|
#--------------------------------------------------------
|
335
335
|
def resource.navigator_eligible?
|
@@ -340,6 +340,21 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
340
340
|
end
|
341
341
|
|
342
342
|
|
343
|
+
#--------------------------------------------------------
|
344
|
+
# Indicates whether or not a page is "legitimate" in
|
345
|
+
# terms of automatic navigation, based in:
|
346
|
+
#
|
347
|
+
# * The resource has a sort order and isn't zero.
|
348
|
+
# * The resource isn't ignored.
|
349
|
+
#
|
350
|
+
# @return (Boolean) Returns `true` if this pages
|
351
|
+
# participates in automatic navigation features.
|
352
|
+
#--------------------------------------------------------
|
353
|
+
def resource.legitimate?
|
354
|
+
self.sort_order && self.sort_order != 0 && !self.ignored
|
355
|
+
end
|
356
|
+
|
357
|
+
|
343
358
|
#--------------------------------------------------------
|
344
359
|
# Returns an array of all of the children of this
|
345
360
|
# resource, taking into account their eligibility for
|
@@ -356,7 +371,7 @@ class MiddlemanPageGroups < ::Middleman::Extension
|
|
356
371
|
#--------------------------------------------------------
|
357
372
|
def resource.legitimate_children
|
358
373
|
self.children
|
359
|
-
.find_all { |p| p.
|
374
|
+
.find_all { |p| p.legitimate? }
|
360
375
|
.sort_by { |p| p.sort_order }
|
361
376
|
end
|
362
377
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-pagegroups
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Derry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -254,11 +254,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.
|
257
|
+
rubygems_version: 2.6.13
|
258
258
|
signing_key:
|
259
259
|
specification_version: 4
|
260
260
|
summary: Provides logical page groups and easy navigation for Middleman projects.
|
261
261
|
test_files:
|
262
262
|
- features/helpers_and_resources.feature
|
263
263
|
- features/support/env.rb
|
264
|
-
has_rdoc:
|