@x-govuk/govuk-eleventy-plugin 8.0.4 → 8.1.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/README.md
CHANGED
|
@@ -30,7 +30,7 @@ export default function(eleventyConfig) {
|
|
|
30
30
|
}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Learn more about how to [get started](https://
|
|
33
|
+
Learn more about how to [get started](https://govuk-eleventy-plugin.x-govuk.org/get-started/) and which [options you can provide](https://govuk-eleventy-plugin.x-govuk.org/get-started/options/).
|
|
34
34
|
|
|
35
35
|
## Releasing a new version
|
|
36
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-govuk/govuk-eleventy-plugin",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.1.1",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using GOV.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"govuk",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"eleventy",
|
|
9
9
|
"eleventy-plugin"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://
|
|
11
|
+
"homepage": "https://govuk-eleventy-plugin.x-govuk.org",
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "git+https://github.com/x-govuk/govuk-eleventy-plugin/issues"
|
|
14
14
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lint:fix": "npm run lint:prettier:fix && npm run lint:js:fix && npm run lint:scss:fix",
|
|
47
47
|
"test": "node --test",
|
|
48
48
|
"coverage": "node --test --experimental-test-coverage",
|
|
49
|
-
"release": "np"
|
|
49
|
+
"release": "np --no-publish"
|
|
50
50
|
},
|
|
51
51
|
"publishConfig": {
|
|
52
52
|
"access": "public"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@11ty/eleventy": "^3.0.0",
|
|
56
56
|
"@11ty/eleventy-navigation": "^1.0.0",
|
|
57
57
|
"@11ty/eleventy-plugin-rss": "^2.0.0",
|
|
58
|
-
"@rollup/plugin-commonjs": "^
|
|
58
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
59
59
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
60
60
|
"@rollup/plugin-terser": "^0.4.4",
|
|
61
61
|
"@x-govuk/govuk-prototype-components": "^5.0.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"markdown-it-deflist": "^3.0.0",
|
|
69
69
|
"markdown-it-footnote": "^4.0.0",
|
|
70
70
|
"markdown-it-github-alerts": "^1.0.0",
|
|
71
|
-
"markdown-it-govuk": "^0.
|
|
71
|
+
"markdown-it-govuk": "^0.8.0",
|
|
72
72
|
"markdown-it-image-figures": "^2.0.0",
|
|
73
73
|
"markdown-it-ins": "^4.0.0",
|
|
74
74
|
"markdown-it-mark": "^4.0.0",
|
package/src/data/options.js
CHANGED
|
@@ -3,7 +3,7 @@ import deepmerge from 'deepmerge'
|
|
|
3
3
|
/**
|
|
4
4
|
* Default option values
|
|
5
5
|
*
|
|
6
|
-
* @see {@link https://
|
|
6
|
+
* @see {@link https://govuk-eleventy-plugin.x-govuk.org/get-started/options/}
|
|
7
7
|
*/
|
|
8
8
|
const defaults = {
|
|
9
9
|
footer: {
|
|
@@ -21,8 +21,10 @@ const defaults = {
|
|
|
21
21
|
touch: '/assets/rebrand/images/govuk-icon-180.png'
|
|
22
22
|
},
|
|
23
23
|
markdown: {
|
|
24
|
+
calvert: true,
|
|
24
25
|
headingPermalinks: false,
|
|
25
|
-
headingsStartWith: 'xl'
|
|
26
|
+
headingsStartWith: 'xl',
|
|
27
|
+
govspeak: true
|
|
26
28
|
},
|
|
27
29
|
opengraphImageUrl: '/assets/rebrand/images/govuk-opengraph-image.png',
|
|
28
30
|
stylesheets: [],
|
package/src/layouts/sitemap.njk
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
{{ appProseScope(content) if content }}
|
|
13
13
|
|
|
14
|
-
{% for item in collections.sitemap | eleventyNavigation(options.homeKey) %}
|
|
14
|
+
{% for item in collections.sitemap | sortCollection(true) | eleventyNavigation(options.homeKey) %}
|
|
15
15
|
<div class="govuk-!-margin-bottom-4">
|
|
16
16
|
<h2 class="govuk-heading-s govuk-!-margin-bottom-1">
|
|
17
17
|
<a class="govuk-link" href="{{ item.url | canonicalUrl | pretty }}">{{ item.title | smart }}</a>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{% endif %}
|
|
22
22
|
{{ collections.sitemap | eleventyNavigation(item.key) | eleventyNavigationToHtml({
|
|
23
23
|
listClass: "app-contents-list govuk-!-margin-left-4"
|
|
24
|
-
}) | safe }}
|
|
24
|
+
}) | smart | safe }}
|
|
25
25
|
</div>
|
|
26
26
|
{% endfor %}
|
|
27
27
|
</div>
|
package/src/markdown-it.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import Nunjucks from 'nunjucks'
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Creates a new tags template
|
|
3
5
|
*
|
|
@@ -35,7 +37,11 @@ export class TagTemplate {
|
|
|
35
37
|
this.slugify = options?.slugify || ((string) => string)
|
|
36
38
|
this.permalink = options?.permalink || '/tags/'
|
|
37
39
|
this.caption = options?.title || 'Tags'
|
|
38
|
-
this.title = (data) =>
|
|
40
|
+
this.title = (data) =>
|
|
41
|
+
Nunjucks.renderString(
|
|
42
|
+
options?.tagTitle || 'Posts tagged ‘{{ tag }}’',
|
|
43
|
+
data
|
|
44
|
+
)
|
|
39
45
|
}
|
|
40
46
|
|
|
41
47
|
/**
|