@x-govuk/nhsuk-eleventy-plugin 1.4.0 → 1.4.2
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-govuk/nhsuk-eleventy-plugin",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using NHS.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nhsuk",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"markdown-it-anchor": "^9.2.1",
|
|
66
66
|
"markdown-it-attribution": "^0.1.4",
|
|
67
67
|
"markdown-it-attrs": "^5.0.0",
|
|
68
|
-
"markdown-it-deflist": "^
|
|
68
|
+
"markdown-it-deflist": "^4.0.0",
|
|
69
69
|
"markdown-it-footnote": "^4.0.0",
|
|
70
70
|
"markdown-it-github-alerts": "^1.0.1",
|
|
71
71
|
"markdown-it-govuk": "^0.9.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"markdown-it-sub": "^2.0.0",
|
|
76
76
|
"markdown-it-sup": "^2.0.0",
|
|
77
77
|
"markdown-it-table-of-contents": "^1.2.0",
|
|
78
|
-
"nhsuk-frontend": "^10.
|
|
78
|
+
"nhsuk-frontend": "^10.6.0",
|
|
79
79
|
"rollup": "^4.62.2",
|
|
80
80
|
"sass": "^1.101.0"
|
|
81
81
|
},
|
package/src/layouts/base.njk
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{% extends "nhsuk/template
|
|
1
|
+
{% extends "nhsuk/template.njk" %}
|
|
2
2
|
|
|
3
3
|
{% set themeColor = options.themeColor | default("#005eb8", true) -%}
|
|
4
4
|
|
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
{% set breadcrumbItems = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key, { includeSelf: includeInBreadcrumbs, allowMissing: true }) | itemsFromNavigation(page.url) if eleventyNavigation.key %}
|
|
16
16
|
{% set showBreadcrumbs = options.showBreadcrumbs != false and breadcrumbItems | length > 0 %}
|
|
17
17
|
|
|
18
|
+
{# These components are imported from NHS.UK frontend with a prefix to avoid naming collisions with front matter data #}
|
|
19
|
+
{% from "nhsuk/components/breadcrumb/macro.njk" import breadcrumb as nhsukBreadcrumb %}
|
|
20
|
+
{% from "nhsuk/components/footer/macro.njk" import footer as nhsukFooter %}
|
|
21
|
+
{% from "nhsuk/components/header/macro.njk" import header as nhsukHeader %}
|
|
22
|
+
{% from "nhsuk/components/images/macro.njk" import image as nhsukImage %}
|
|
23
|
+
{% from "nhsuk/components/pagination/macro.njk" import pagination as nhsukPagination %}
|
|
24
|
+
|
|
18
25
|
{% from "components/card-group/macro.njk" import appCardGroup with context %}
|
|
19
26
|
{% from "components/document-header/macro.njk" import appDocumentHeader %}
|
|
20
27
|
{% from "components/document-list/macro.njk" import appDocumentList %}
|
|
@@ -59,15 +66,15 @@
|
|
|
59
66
|
{% block header %}
|
|
60
67
|
{% if options._searchIndexPath %}
|
|
61
68
|
<app-search index="{{ options._searchIndexPath | htmlBaseUrl }}">
|
|
62
|
-
{{
|
|
69
|
+
{{ nhsukHeader(options.header | currentPage(page.url)) }}
|
|
63
70
|
</app-search>
|
|
64
71
|
{% else %}
|
|
65
|
-
{{
|
|
72
|
+
{{ nhsukHeader(options.header | currentPage(page.url)) }}
|
|
66
73
|
{% endif %}
|
|
67
74
|
{% endblock %}
|
|
68
75
|
|
|
69
76
|
{% block footer %}
|
|
70
|
-
{{
|
|
77
|
+
{{ nhsukFooter(options.footer) }}
|
|
71
78
|
{% endblock %}
|
|
72
79
|
|
|
73
80
|
{% block bodyEnd %}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% extends "layouts/base.njk" %}
|
|
2
2
|
|
|
3
3
|
{% block beforeContent %}
|
|
4
|
-
{{
|
|
4
|
+
{{ nhsukBreadcrumb({
|
|
5
5
|
items: breadcrumbItems
|
|
6
6
|
}) if showBreadcrumbs }}
|
|
7
7
|
{% endblock %}
|
|
@@ -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
|
+
{{ nhsukPagination({
|
|
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 %}
|
package/src/layouts/hub.njk
CHANGED
package/src/layouts/page.njk
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% extends "layouts/base.njk" %}
|
|
2
2
|
|
|
3
3
|
{% block beforeContent %}
|
|
4
|
-
{{
|
|
4
|
+
{{ nhsukBreadcrumb({
|
|
5
5
|
items: breadcrumbItems
|
|
6
6
|
}) if showBreadcrumbs }}
|
|
7
7
|
{% endblock %}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{% if showPagination %}
|
|
19
19
|
{% set previous = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getPreviousNavigationItem(page.url) %}
|
|
20
20
|
{% set next = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getNextNavigationItem(page.url) %}
|
|
21
|
-
{{
|
|
21
|
+
{{ nhsukPagination({
|
|
22
22
|
classes: "nhsuk-u-reading-width",
|
|
23
23
|
previousUrl: previous.url if previous,
|
|
24
24
|
previousPage: previous.title if previous,
|
package/src/layouts/post.njk
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% extends "layouts/base.njk" %}
|
|
2
2
|
|
|
3
3
|
{% block beforeContent %}
|
|
4
|
-
{{
|
|
4
|
+
{{ nhsukBreadcrumb({
|
|
5
5
|
items: breadcrumbItems
|
|
6
6
|
}) if showBreadcrumbs }}
|
|
7
7
|
{% endblock %}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}) }}
|
|
22
22
|
|
|
23
23
|
{% call appProseScope() %}
|
|
24
|
-
{{
|
|
24
|
+
{{ nhsukImage({
|
|
25
25
|
classes: "app-image--full",
|
|
26
26
|
src: image.src,
|
|
27
27
|
alt: image.alt,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
{% if showPagination %}
|
|
35
35
|
{% set previous = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getPreviousNavigationItem(page.url) %}
|
|
36
36
|
{% set next = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getNextNavigationItem(page.url) %}
|
|
37
|
-
{{
|
|
37
|
+
{{ nhsukPagination({
|
|
38
38
|
classes: "nhsuk-u-reading-width",
|
|
39
39
|
previousUrl: previous.url if previous,
|
|
40
40
|
previousPage: previous.title if previous,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% extends "layouts/base.njk" %}
|
|
2
2
|
|
|
3
3
|
{% block beforeContent %}
|
|
4
|
-
{{
|
|
4
|
+
{{ nhsukBreadcrumb({
|
|
5
5
|
items: breadcrumbItems
|
|
6
6
|
}) if showBreadcrumbs }}
|
|
7
7
|
{% endblock %}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
{% if showPagination %}
|
|
26
26
|
{% set previous = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getPreviousNavigationItem(page.url) %}
|
|
27
27
|
{% set next = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getNextNavigationItem(page.url) %}
|
|
28
|
-
{{
|
|
28
|
+
{{ nhsukPagination({
|
|
29
29
|
classes: "nhsuk-u-reading-width",
|
|
30
30
|
previousUrl: previous.url if previous,
|
|
31
31
|
previousPage: previous.title if previous,
|