middleman-pagegroups 1.0.2 → 1.0.3

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.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +8 -1
  3. data/.yardopts +8 -0
  4. data/CHANGELOG.md +24 -4
  5. data/README.md +5 -5
  6. data/Rakefile +201 -7
  7. data/documentation_project/Gemfile +2 -2
  8. data/documentation_project/config.rb +15 -19
  9. data/documentation_project/source/documentation/100_nested_folder/another_file.html.md.erb +19 -0
  10. data/documentation_project/source/documentation/100_nested_folder/index.html.md.erb +25 -0
  11. data/documentation_project/source/documentation/100_nested_folder/one_file.html.md.erb +11 -0
  12. data/documentation_project/source/documentation/100_nested_folder/stray.txt +6 -0
  13. data/documentation_project/source/documentation/10_concepts.html.md.erb +1 -1
  14. data/documentation_project/source/documentation/20_directory_organization.html.md.erb +12 -10
  15. data/documentation_project/source/documentation/40_resources.html.md.erb +3 -68
  16. data/documentation_project/source/documentation/50_helpers.html.md.erb +41 -163
  17. data/documentation_project/source/documentation/60_sample_partials.html.md.erb +23 -22
  18. data/documentation_project/source/documentation/80_config.html.md.erb +6 -0
  19. data/documentation_project/source/documentation/90_cli.html.md.erb +47 -0
  20. data/documentation_project/source/partials/_yard_config.erb +744 -0
  21. data/documentation_project/source/partials/_yard_helpers.erb +710 -0
  22. data/documentation_project/source/partials/_yard_helpers_css.erb +523 -0
  23. data/documentation_project/source/partials/_yard_helpers_extended.erb +56 -0
  24. data/documentation_project/source/partials/_yard_resources.erb +540 -0
  25. data/documentation_project/source/stylesheets/_middlemac_minimal.scss +287 -0
  26. data/features/helpers_and_resources.feature +120 -0
  27. data/features/support/env.rb +20 -0
  28. data/fixtures/middleman_pagegroups_app/config.rb +17 -0
  29. data/fixtures/middleman_pagegroups_app/source/20_sub_folder_02/index.html.md.erb +8 -0
  30. data/fixtures/middleman_pagegroups_app/source/20_sub_folder_02/not_legitimate.html.md.erb +8 -0
  31. data/fixtures/middleman_pagegroups_app/source/20_sub_folder_02/sibling_one.html.md.erb +8 -0
  32. data/fixtures/middleman_pagegroups_app/source/20_sub_folder_02/sibling_two.html.md.erb +8 -0
  33. data/fixtures/middleman_pagegroups_app/source/_partial.md.erb +111 -0
  34. data/fixtures/middleman_pagegroups_app/source/index.html.md.erb +23 -0
  35. data/fixtures/middleman_pagegroups_app/source/layout.erb +6 -0
  36. data/fixtures/middleman_pagegroups_app/source/sub_folder_01/10_sibling_one.html.md.erb +7 -0
  37. data/fixtures/middleman_pagegroups_app/source/sub_folder_01/20_sibling_two.html.md.erb +7 -0
  38. data/fixtures/middleman_pagegroups_app/source/sub_folder_01/30_sibling_three.html.md.erb +7 -0
  39. data/fixtures/middleman_pagegroups_app/source/sub_folder_01/index.html.md.erb +9 -0
  40. data/lib/middleman-pagegroups/extension.rb +468 -110
  41. data/lib/middleman-pagegroups/partials.rb +9 -12
  42. data/lib/middleman-pagegroups/version.rb +1 -1
  43. data/middleman-pagegroups.gemspec +10 -2
  44. data/yard/readme.md +5 -0
  45. data/yard/template-grouped/default/module/html/method_details_list.erb +11 -0
  46. data/yard/template-partials/default/method_details/setup.rb +4 -0
  47. data/yard/template-partials/default/module/html/attribute_details.erb +9 -0
  48. data/yard/template-partials/default/module/html/method_details_list.erb +10 -0
  49. data/yard/template-partials/default/module/setup.rb +6 -0
  50. data/yard/template-partials/default/onefile/html/layout.erb +1 -0
  51. data/yard/template-partials/default/onefile/html/setup.rb +4 -0
  52. data/yard/yard_extensions.rb +109 -0
  53. metadata +105 -7
@@ -0,0 +1,56 @@
1
+
2
+
3
+
4
+
5
+
6
+ <div class="method_details_list">
7
+
8
+
9
+
10
+ <div class="method_details first">
11
+ <h3 class="signature first" id="page_classes-instance_method">
12
+
13
+ - (<tt>String</tt>) <strong>page_classes</strong>
14
+
15
+
16
+
17
+
18
+
19
+ </h3><div class="docstring">
20
+ <div class="discussion">
21
+ <p>Extend the built-in page_classes to include the naked
22
+ group and page name. The features of this helper are
23
+ enabled only if <code>options[:extend_page_class]</code> is
24
+ <code>true</code>.</p>
25
+
26
+
27
+ </div>
28
+ </div>
29
+ <div class="tags">
30
+
31
+ <p class="tag_title">Returns:</p>
32
+ <ul class="return">
33
+
34
+ <li>
35
+
36
+
37
+ <span class='type'>(<tt>String</tt>)</span>
38
+
39
+
40
+
41
+ &mdash;
42
+ <div class='inline'><p>Returns the classes that correspond
43
+ to the site hierarchy.</p>
44
+ </div>
45
+
46
+ </li>
47
+
48
+ </ul>
49
+
50
+ </div>
51
+ </div>
52
+
53
+
54
+ </div>
55
+
56
+
@@ -0,0 +1,540 @@
1
+
2
+
3
+
4
+
5
+
6
+ <div class="method_details_list">
7
+
8
+
9
+
10
+ <div class="method_details first">
11
+ <h3 class="signature first" id="resource.breadcrumbs-instance_method">
12
+
13
+ - (<tt>Array&lt;Sitemap::Resource&gt;</tt>) <strong>resource.breadcrumbs</strong>
14
+
15
+
16
+
17
+
18
+
19
+ </h3><div class="docstring">
20
+ <div class="discussion">
21
+ <p>Returns an array of resources leading to this resource.</p>
22
+
23
+
24
+ </div>
25
+ </div>
26
+ <div class="tags">
27
+
28
+ <p class="tag_title">Returns:</p>
29
+ <ul class="return">
30
+
31
+ <li>
32
+
33
+
34
+ <span class='type'>(<tt>Array&lt;Sitemap::Resource&gt;</tt>)</span>
35
+
36
+
37
+
38
+ &mdash;
39
+ <div class='inline'><p>An array of
40
+ resources.</p>
41
+ </div>
42
+
43
+ </li>
44
+
45
+ </ul>
46
+
47
+ </div>
48
+ </div>
49
+
50
+ <div class="method_details ">
51
+ <h3 class="signature " id="resource.brethren-instance_method">
52
+
53
+ - (<tt>Array&lt;Sitemap::Resource&gt;</tt>) <strong>resource.brethren</strong>
54
+
55
+
56
+
57
+
58
+
59
+ </h3><div class="docstring">
60
+ <div class="discussion">
61
+ <p>Returns an array of all of the siblings of this page,
62
+ taking into account their eligibility for display.</p>
63
+
64
+ <ul>
65
+ <li>is not already the current page.</li>
66
+ <li>has a <code>sort_order</code>.</li>
67
+ <li>is not ignored.</li>
68
+ </ul>
69
+
70
+ <p>The returned array will be sorted by each item’s
71
+ <code>sort_order</code>.</p>
72
+
73
+
74
+ </div>
75
+ </div>
76
+ <div class="tags">
77
+
78
+ <p class="tag_title">Returns:</p>
79
+ <ul class="return">
80
+
81
+ <li>
82
+
83
+
84
+ <span class='type'>(<tt>Array&lt;Sitemap::Resource&gt;</tt>)</span>
85
+
86
+
87
+
88
+ &mdash;
89
+ <div class='inline'><p>An array of
90
+ resources.</p>
91
+ </div>
92
+
93
+ </li>
94
+
95
+ </ul>
96
+
97
+ </div>
98
+ </div>
99
+
100
+ <div class="method_details ">
101
+ <h3 class="signature " id="resource.brethren_next-instance_method">
102
+
103
+ - (<tt>Sitemap::Resource</tt>) <strong>resource.brethren_next</strong>
104
+
105
+
106
+
107
+
108
+
109
+ </h3><div class="docstring">
110
+ <div class="discussion">
111
+ <p>Returns the next sibling based on order, or <code>nil</code> if
112
+ there is no next sibling.</p>
113
+
114
+
115
+ </div>
116
+ </div>
117
+ <div class="tags">
118
+
119
+ <p class="tag_title">Returns:</p>
120
+ <ul class="return">
121
+
122
+ <li>
123
+
124
+
125
+ <span class='type'>(<tt>Sitemap::Resource</tt>)</span>
126
+
127
+
128
+
129
+ &mdash;
130
+ <div class='inline'><p>The resource instance of
131
+ the next sibling.</p>
132
+ </div>
133
+
134
+ </li>
135
+
136
+ </ul>
137
+
138
+ </div>
139
+ </div>
140
+
141
+ <div class="method_details ">
142
+ <h3 class="signature " id="resource.brethren_previous-instance_method">
143
+
144
+ - (<tt>Sitemap::Resource</tt>) <strong>resource.brethren_previous</strong>
145
+
146
+
147
+
148
+
149
+
150
+ </h3><div class="docstring">
151
+ <div class="discussion">
152
+ <p>Returns the previous sibling based on order, or <code>nil</code>
153
+ if there is no previous sibling.</p>
154
+
155
+
156
+ </div>
157
+ </div>
158
+ <div class="tags">
159
+
160
+ <p class="tag_title">Returns:</p>
161
+ <ul class="return">
162
+
163
+ <li>
164
+
165
+
166
+ <span class='type'>(<tt>Sitemap::Resource</tt>)</span>
167
+
168
+
169
+
170
+ &mdash;
171
+ <div class='inline'><p>The resource instance of
172
+ the previous sibling.</p>
173
+ </div>
174
+
175
+ </li>
176
+
177
+ </ul>
178
+
179
+ </div>
180
+ </div>
181
+
182
+ <div class="method_details ">
183
+ <h3 class="signature " id="resource.group_count-instance_method">
184
+
185
+ - (<tt>Integer</tt>) <strong>resource.group_count</strong>
186
+
187
+
188
+
189
+
190
+
191
+ </h3><div class="docstring">
192
+ <div class="discussion">
193
+ <p>Returns the quantity of pages in the current page’s
194
+ group, including this current page, i.e., the number
195
+ of <code>brethren + 1</code>.</p>
196
+
197
+
198
+ </div>
199
+ </div>
200
+ <div class="tags">
201
+
202
+ <p class="tag_title">Returns:</p>
203
+ <ul class="return">
204
+
205
+ <li>
206
+
207
+
208
+ <span class='type'>(<tt>Integer</tt>)</span>
209
+
210
+
211
+
212
+ &mdash;
213
+ <div class='inline'><p>The total number of pages in the
214
+ this page’s current group.</p>
215
+ </div>
216
+
217
+ </li>
218
+
219
+ </ul>
220
+
221
+ </div>
222
+ </div>
223
+
224
+ <div class="method_details ">
225
+ <h3 class="signature " id="resource.legitimate_children-instance_method">
226
+
227
+ - (<tt>Array&lt;Sitemap::Resource&gt;</tt>) <strong>resource.legitimate_children</strong>
228
+
229
+
230
+
231
+
232
+
233
+ </h3><div class="docstring">
234
+ <div class="discussion">
235
+ <p>Returns an array of all of the children of this
236
+ resource, taking into account their eligibility for
237
+ display. Each child is legitimate if it:</p>
238
+
239
+ <ul>
240
+ <li>has a sort_order.</li>
241
+ <li>is not ignored.</li>
242
+ </ul>
243
+
244
+ <p>The returned array will be sorted by each item’s
245
+ <code>sort_order</code>.</p>
246
+
247
+
248
+ </div>
249
+ </div>
250
+ <div class="tags">
251
+
252
+ <p class="tag_title">Returns:</p>
253
+ <ul class="return">
254
+
255
+ <li>
256
+
257
+
258
+ <span class='type'>(<tt>Array&lt;Sitemap::Resource&gt;</tt>)</span>
259
+
260
+
261
+
262
+ &mdash;
263
+ <div class='inline'><p>An array of
264
+ resources.</p>
265
+ </div>
266
+
267
+ </li>
268
+
269
+ </ul>
270
+
271
+ </div>
272
+ </div>
273
+
274
+ <div class="method_details ">
275
+ <h3 class="signature " id="resource.navigator_eligible?-instance_method">
276
+
277
+ - (<tt>Boolean</tt>) <strong>resource.navigator_eligible?</strong>
278
+
279
+
280
+
281
+
282
+
283
+ </h3><div class="docstring">
284
+ <div class="discussion">
285
+ <p>Determines whether a page is eligible to include a
286
+ previous/next page control. This is based on:</p>
287
+
288
+ <ul>
289
+ <li>The group is set to allow navigation via the
290
+ <code>:navigate</code> front matter key.</li>
291
+ <li>This page is not excluded from navigation via the
292
+ use of <code>:navigator =&gt; false</code> in its front matter.</li>
293
+ <li>This page has a <code>sort_order</code>.</li>
294
+ </ul>
295
+
296
+
297
+ </div>
298
+ </div>
299
+ <div class="tags">
300
+
301
+ <p class="tag_title">Returns:</p>
302
+ <ul class="return">
303
+
304
+ <li>
305
+
306
+
307
+ <span class='type'>(<tt>Boolean</tt>)</span>
308
+
309
+
310
+
311
+ &mdash;
312
+ <div class='inline'><p>Returns <code>true</code> if this pages is
313
+ eligible for a previous/next page control.</p>
314
+ </div>
315
+
316
+ </li>
317
+
318
+ </ul>
319
+
320
+ </div>
321
+ </div>
322
+
323
+ <div class="method_details ">
324
+ <h3 class="signature " id="resource.page_group-instance_method">
325
+
326
+ - (<tt>String</tt>) <strong>resource.page_group</strong>
327
+
328
+
329
+
330
+
331
+
332
+ </h3><div class="docstring">
333
+ <div class="discussion">
334
+ <p>Make <code>page_group</code> available for each resource.
335
+ Useful for for assigning classes, and/or group
336
+ conditionals.</p>
337
+
338
+
339
+ </div>
340
+ </div>
341
+ <div class="tags">
342
+
343
+ <p class="tag_title">Returns:</p>
344
+ <ul class="return">
345
+
346
+ <li>
347
+
348
+
349
+ <span class='type'>(<tt>String</tt>)</span>
350
+
351
+
352
+
353
+ &mdash;
354
+ <div class='inline'><p>The <code>page_group</code> of the current page.</p>
355
+ </div>
356
+
357
+ </li>
358
+
359
+ </ul>
360
+
361
+ </div>
362
+ </div>
363
+
364
+ <div class="method_details ">
365
+ <h3 class="signature " id="resource.page_name-instance_method">
366
+
367
+ - (<tt>String</tt>) <strong>resource.page_name</strong>
368
+
369
+
370
+
371
+
372
+
373
+ </h3><div class="docstring">
374
+ <div class="discussion">
375
+ <p>Make <code>page_name</code> available for each resource. This is
376
+ the file’s base name after any renaming has occurred.
377
+ Useful for assigning classes, etc.</p>
378
+
379
+
380
+ </div>
381
+ </div>
382
+ <div class="tags">
383
+
384
+ <p class="tag_title">Returns:</p>
385
+ <ul class="return">
386
+
387
+ <li>
388
+
389
+
390
+ <span class='type'>(<tt>String</tt>)</span>
391
+
392
+
393
+
394
+ &mdash;
395
+ <div class='inline'><p>The <code>page_name</code> of the current page.</p>
396
+ </div>
397
+
398
+ </li>
399
+
400
+ </ul>
401
+
402
+ </div>
403
+ </div>
404
+
405
+ <div class="method_details ">
406
+ <h3 class="signature " id="resource.page_sequence-instance_method">
407
+
408
+ - (<tt>Integer</tt>, <tt>Nil</tt>) <strong>resource.page_sequence</strong>
409
+
410
+
411
+
412
+
413
+
414
+ </h3><div class="docstring">
415
+ <div class="discussion">
416
+ <p>Returns the page sequence amongst all of the brethren,
417
+ and can be used as a page number surrogate. The first
418
+ page is 1. Pages without a sort order will have a <code>nil</code>
419
+ <code>page_sequence</code>.</p>
420
+
421
+
422
+ </div>
423
+ </div>
424
+ <div class="tags">
425
+
426
+ <p class="tag_title">Returns:</p>
427
+ <ul class="return">
428
+
429
+ <li>
430
+
431
+
432
+ <span class='type'>(<tt>Integer</tt>, <tt>Nil</tt>)</span>
433
+
434
+
435
+
436
+ &mdash;
437
+ <div class='inline'><p>The current page sequence of
438
+ this resource among its brethren.</p>
439
+ </div>
440
+
441
+ </li>
442
+
443
+ </ul>
444
+
445
+ </div>
446
+ </div>
447
+
448
+ <div class="method_details ">
449
+ <h3 class="signature " id="resource.parent-instance_method">
450
+
451
+ - (<tt>Sitemap::Resource</tt>) <strong>resource.parent</strong>
452
+
453
+
454
+
455
+
456
+
457
+ </h3><div class="docstring">
458
+ <div class="discussion">
459
+ <p>Return the parent of the resource. This implementation
460
+ corrects a bug in <strong>Middleman</strong> as of 4.1.7 wherein
461
+ <strong>Middleman</strong> doesn’t return the parent if the the
462
+ directory has been renamed for output.</p>
463
+
464
+
465
+ </div>
466
+ </div>
467
+ <div class="tags">
468
+
469
+ <p class="tag_title">Returns:</p>
470
+ <ul class="return">
471
+
472
+ <li>
473
+
474
+
475
+ <span class='type'>(<tt>Sitemap::Resource</tt>)</span>
476
+
477
+
478
+
479
+ &mdash;
480
+ <div class='inline'><p>The resource instance of
481
+ the resource’s parent.</p>
482
+ </div>
483
+
484
+ </li>
485
+
486
+ </ul>
487
+
488
+ </div>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="resource.sort_order-instance_method">
493
+
494
+ - (<tt>Integer</tt>) <strong>resource.sort_order</strong>
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+ <p>Returns the page sort order or 0 if no page sort order
503
+ was applied.</p>
504
+
505
+ <p>Pages without a sort order can still be linked to;
506
+ they simply aren’t brethren or legitimate children,
507
+ and so don’t participate in any of the automatic
508
+ navigation features.</p>
509
+
510
+
511
+ </div>
512
+ </div>
513
+ <div class="tags">
514
+
515
+ <p class="tag_title">Returns:</p>
516
+ <ul class="return">
517
+
518
+ <li>
519
+
520
+
521
+ <span class='type'>(<tt>Integer</tt>)</span>
522
+
523
+
524
+
525
+ &mdash;
526
+ <div class='inline'><p>The current resource’s sort order
527
+ within its group, or 0 if no sort order was applied.</p>
528
+ </div>
529
+
530
+ </li>
531
+
532
+ </ul>
533
+
534
+ </div>
535
+ </div>
536
+
537
+
538
+ </div>
539
+
540
+