eleventy-plugin-nav 0.0.4 → 0.0.5

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.
package/README.md CHANGED
@@ -109,8 +109,6 @@ such as indices, navbars, breadcrumbs and the like.
109
109
  | `trail` | `CollectionItem[]` | Array of a page's ancestors, excluding the root |
110
110
  | `siblingIndex` | `number` | The index of the current page among its parent’s children. `-1` if no parent. |
111
111
  | `siblings` | `CollectionItem[]` | Other pages by the same parent. Excludes current page. |
112
- | `nextPage` | `CollectionItem` | The page that comes before the current page in the parent's children |
113
- | `previousPage` | `CollectionItem` | The page that comes after the current page in the parent's children |
114
112
  | `hidden` | `boolean` | Whether the page should be included in listings |
115
113
  | `shown` | `boolean` | Whether the page should be included in listings |
116
114
  | `rootItem` | `CollectionItem` | The item of the page’s homepage. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eleventy-plugin-nav",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Description",
5
5
  "keywords": [
6
6
  "eleventy-plugin"
@@ -92,19 +92,3 @@ export function siblings (data) {
92
92
 
93
93
  return ret;
94
94
  }
95
-
96
- export function nextPage (data) {
97
- while (data && data.parentItem && !data.siblingsAfter[0]) {
98
- data = data.parentItem.data;
99
- }
100
-
101
- return data?.siblingsAfter[0];
102
- }
103
-
104
- export function previousPage (data) {
105
- while (data && data.parentItem && !data.siblingsBefore.at(-1)) {
106
- data = data.parentItem.data;
107
- }
108
-
109
- return data?.siblingsBefore.at(-1);
110
- }
@@ -1,15 +0,0 @@
1
- <nav class="prev-next">
2
- {% if previousPage -%}
3
- <a class="previous" href="{{ previousPage.url }}">
4
- <span class="desc">Previous page</span>
5
- <span class="title">{{ previousPage.data.title }}</span>
6
- </a>
7
- {%- endif %}
8
-
9
- {% if nextPage -%}
10
- <a class="next" href="{{ nextPage.url }}">
11
- <span class="desc">Previous page</span>
12
- <span class="title">{{ nextPage.data.title }}</span>
13
- </a>
14
- {%- endif %}
15
- </nav>