@x-govuk/govuk-eleventy-plugin 6.5.0 → 6.6.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.
|
@@ -53,20 +53,22 @@
|
|
|
53
53
|
<span class="govuk-footer__licence-description">
|
|
54
54
|
{{ params.contentLicence.html | safe if params.contentLicence.html else params.contentLicence.text }}
|
|
55
55
|
</span>
|
|
56
|
-
{%
|
|
56
|
+
{% elseif params.contentLicence != false %}
|
|
57
57
|
{% include "./_ogl.svg" %}
|
|
58
58
|
<span class="govuk-footer__licence-description">
|
|
59
59
|
All content is available under the <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>, except where otherwise stated
|
|
60
60
|
</span>
|
|
61
61
|
{% endif %}
|
|
62
62
|
</div>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
{%- if params.copyright != false -%}
|
|
64
|
+
<div class="govuk-footer__meta-item">
|
|
65
|
+
{%- if params.copyright.html or params.copyright.text -%}
|
|
66
|
+
{{ params.copyright.html | safe if params.copyright.html else params.copyright.text }}
|
|
67
|
+
{% else %}
|
|
68
|
+
<a class="govuk-footer__link govuk-footer__copyright-logo" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">© Crown copyright</a>
|
|
69
|
+
{% endif %}
|
|
70
|
+
</div>
|
|
68
71
|
{% endif %}
|
|
69
|
-
</div>
|
|
70
72
|
</div>
|
|
71
73
|
</div>
|
|
72
74
|
</footer>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<site-search class="app-site-search govuk-!-display-none-print" index="{{ params.indexPath |
|
|
1
|
+
<site-search class="app-site-search govuk-!-display-none-print" index="{{ params.indexPath | canonicalUrl }}" label="{{ params.label | default("Search site") }}">
|
|
2
2
|
{%- if params.sitemapPath -%}
|
|
3
3
|
<a class="app-site-search__link" href="{{ params.sitemapPath }}">Sitemap</a>
|
|
4
4
|
{%- endif -%}
|
|
@@ -6,14 +6,19 @@ const path = require('node:path')
|
|
|
6
6
|
* @returns {string} Canonical site URL with resolved path
|
|
7
7
|
*/
|
|
8
8
|
module.exports = function (string = '') {
|
|
9
|
-
const {
|
|
9
|
+
const { options } = this.ctx
|
|
10
|
+
|
|
11
|
+
// No site URL configured
|
|
12
|
+
if (!options?.url) {
|
|
13
|
+
return string
|
|
14
|
+
}
|
|
10
15
|
|
|
11
16
|
// If plugin options do not provide a site URL, return the path
|
|
12
|
-
if (!URL.canParse(url)) {
|
|
17
|
+
if (!URL.canParse(options.url)) {
|
|
13
18
|
return string
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
const siteUrl = new URL(url)
|
|
21
|
+
const siteUrl = new URL(options.url)
|
|
17
22
|
|
|
18
23
|
// If incoming string is a URL, return that if it’s an external URL
|
|
19
24
|
if (URL.canParse(string)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-govuk/govuk-eleventy-plugin",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.1",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using GOV.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"govuk",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"markdown-it-mark": "^4.0.0",
|
|
72
72
|
"markdown-it-sub": "^2.0.0",
|
|
73
73
|
"markdown-it-sup": "^2.0.0",
|
|
74
|
-
"markdown-it-table-of-contents": "^0.
|
|
74
|
+
"markdown-it-table-of-contents": "^0.8.0",
|
|
75
75
|
"rimraf": "^5.0.0",
|
|
76
76
|
"rollup": "^4.1.0",
|
|
77
77
|
"sass": "^1.45.1",
|