@x-govuk/nhsuk-eleventy-plugin 1.4.0 → 1.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.
package/package.json
CHANGED
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
* @see {@link https://www.11ty.dev/docs/plugins/navigation/}
|
|
10
10
|
*/
|
|
11
11
|
export const eleventyComputed = {
|
|
12
|
+
// Alias for Eleventy's pagination data to avoid naming conflict with the
|
|
13
|
+
// nhsuk-frontend `pagination` Nunjucks macro in template-with-imports.njk
|
|
14
|
+
eleventyPagination: (data) => data.pagination,
|
|
12
15
|
eleventyNavigation: {
|
|
13
16
|
key: (data) => getNavigationKey(data),
|
|
14
17
|
parent: (data) => getNavigationParent(data),
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
|
|
24
24
|
{{ appDocumentList({
|
|
25
25
|
headingLevel: 3 if paginationHeading else 2,
|
|
26
|
-
items:
|
|
26
|
+
items: eleventyPagination.items
|
|
27
27
|
}) }}
|
|
28
28
|
|
|
29
29
|
{{ pagination({
|
|
30
30
|
previous: {
|
|
31
|
-
href:
|
|
31
|
+
href: eleventyPagination.href.previous
|
|
32
32
|
},
|
|
33
33
|
next: {
|
|
34
|
-
href:
|
|
34
|
+
href: eleventyPagination.href.next
|
|
35
35
|
},
|
|
36
|
-
items:
|
|
37
|
-
}) if
|
|
36
|
+
items: eleventyPagination | itemsFromPagination
|
|
37
|
+
}) if eleventyPagination.pages.length > 1 }}
|
|
38
38
|
|
|
39
39
|
{{ appRelated(related) if related }}
|
|
40
40
|
{% endblock %}
|