@x-govuk/govuk-eleventy-plugin 5.0.5 → 5.0.7
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 +16 -7
- package/components/link/_link.scss +1 -1
- package/components/prose-scope/_prose-scope.scss +3 -3
- package/components/site-search/_site-search.scss +1 -1
- package/lib/filters/items-from-navigation.js +1 -0
- package/lib/filters/no-orphans.js +2 -2
- package/lib/markdown-it/deflist.js +1 -1
- package/lib/markdown-it/footnote.js +1 -1
- package/lib/markdown-it/table-of-contents.js +1 -1
- package/lib/markdown-it/table.js +1 -3
- package/package.json +36 -16
package/README.md
CHANGED
|
@@ -4,16 +4,16 @@ Build documentation websites using Markdown and GOV.UK styles.
|
|
|
4
4
|
|
|
5
5
|
You’re welcome to use the plugin even if your service isn’t considered part of GOV.UK, but your site or service must not:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
- identify itself as being part of GOV.UK
|
|
8
|
+
- use the crown or GOV.UK logotype in the header
|
|
9
|
+
- use the GDS Transport typeface
|
|
10
|
+
- suggest that it’s an official UK government website if it’s not
|
|
11
11
|
|
|
12
12
|
## Requirements
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
- [Node.js](https://nodejs.org) v16.0.0 or above
|
|
15
|
+
- [npm CLI](https://docs.npmjs.com/cli) v8.0.0 or above
|
|
16
|
+
- [Eleventy](https://www.11ty.dev) v2.0.0 or above
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
@@ -30,3 +30,12 @@ eleventyConfig.addPlugin(govukEleventyPlugin, {
|
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Learn more about how to [get started](https://x-govuk.github.io/govuk-eleventy-plugin/get-started/) and which [options you can provide](https://x-govuk.github.io/govuk-eleventy-plugin/options/).
|
|
33
|
+
|
|
34
|
+
## Releasing a new version
|
|
35
|
+
|
|
36
|
+
`npm run release`
|
|
37
|
+
|
|
38
|
+
This command will ask you what version you want to use. It will then publish a new version on NPM, create and push a new git tag and then generate release notes ready for posting on GitHub.
|
|
39
|
+
|
|
40
|
+
> ![NOTE]
|
|
41
|
+
> Releasing a new version requires permission to publish packages to the `@x-govuk` organisation.
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
sup {
|
|
37
|
-
top:
|
|
37
|
+
top: -0.4em;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
sub {
|
|
41
|
-
bottom:
|
|
41
|
+
bottom: -0.4em;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
img {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
// Show outline around linked images within figures
|
|
57
57
|
img {
|
|
58
58
|
display: block;
|
|
59
|
-
outline: 1px solid rgba($govuk-border-colour, .5);
|
|
59
|
+
outline: 1px solid rgba($govuk-border-colour, 0.5);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
> .govuk-link img {
|
|
@@ -20,6 +20,7 @@ module.exports = (eleventyNavigation, pageUrl = false, options = {}) => {
|
|
|
20
20
|
const navItem = {
|
|
21
21
|
current: isCurrentPage,
|
|
22
22
|
parent: pageUrl ? pageUrl.startsWith(item.url, pathPrefix) : false,
|
|
23
|
+
href: url(item.url, pathPrefix),
|
|
23
24
|
text: smart(item.title),
|
|
24
25
|
children: item.children
|
|
25
26
|
? item.children.map(child => ({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { normalise } = require('../utils.js')
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Insert non-breaking space between
|
|
5
|
-
*
|
|
4
|
+
* Insert non-breaking space between last two words of a string. This prevents
|
|
5
|
+
* an orphaned word appearing by itself at the end of a paragraph.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* noOrphans('Department for Education') // Department for Education
|
package/lib/markdown-it/table.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Add `tabindex` so that table scrolling can be controlled via the keyboard.
|
|
2
|
+
* Render a table with `tabindex` to enable keyboard scrolling
|
|
5
3
|
*
|
|
6
4
|
* @param {Function} md - markdown-it instance
|
|
7
5
|
* @returns {Function} - markdown-it rendering rules
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x-govuk/govuk-eleventy-plugin",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using GOV.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"govuk",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"predev": "rimraf _site",
|
|
37
37
|
"dev": "eleventy --serve --watch",
|
|
38
38
|
"start": "eleventy --serve",
|
|
39
|
-
"lint": "standard && stylelint '**/*.scss'",
|
|
40
|
-
"test": "
|
|
41
|
-
"
|
|
42
|
-
"
|
|
39
|
+
"lint": "prettier . --check && standard && stylelint '**/*.scss'",
|
|
40
|
+
"test": "node --test",
|
|
41
|
+
"coverage": "node --test --experimental-test-coverage",
|
|
42
|
+
"release": "np"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@11ty/eleventy": "^2.0.0",
|
|
@@ -51,32 +51,32 @@
|
|
|
51
51
|
"deepmerge": "^4.2.2",
|
|
52
52
|
"govuk-frontend": "^4.3.0",
|
|
53
53
|
"luxon": "^3.0.1",
|
|
54
|
-
"markdown-it-abbr": "^
|
|
54
|
+
"markdown-it-abbr": "^2.0.0",
|
|
55
55
|
"markdown-it-anchor": "^8.4.1",
|
|
56
|
-
"markdown-it-deflist": "^
|
|
57
|
-
"markdown-it-footnote": "^
|
|
56
|
+
"markdown-it-deflist": "^3.0.0",
|
|
57
|
+
"markdown-it-footnote": "^4.0.0",
|
|
58
58
|
"markdown-it-govuk": "^0.1.0",
|
|
59
59
|
"markdown-it-image-figures": "^2.0.0",
|
|
60
|
-
"markdown-it-ins": "^
|
|
61
|
-
"markdown-it-mark": "^
|
|
62
|
-
"markdown-it-sub": "^
|
|
63
|
-
"markdown-it-sup": "^
|
|
60
|
+
"markdown-it-ins": "^4.0.0",
|
|
61
|
+
"markdown-it-mark": "^4.0.0",
|
|
62
|
+
"markdown-it-sub": "^2.0.0",
|
|
63
|
+
"markdown-it-sup": "^2.0.0",
|
|
64
64
|
"markdown-it-table-of-contents": "^0.6.0",
|
|
65
65
|
"rimraf": "^5.0.0",
|
|
66
|
-
"rollup": "^
|
|
66
|
+
"rollup": "^4.1.0",
|
|
67
67
|
"sass": "^1.45.1",
|
|
68
68
|
"smartypants": "^0.2.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@x-govuk/govuk-eleventy-plugin": "file:./",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
72
|
+
"np": "^9.0.0",
|
|
73
|
+
"prettier": "^3.0.0",
|
|
74
74
|
"standard": "^17.0.0",
|
|
75
75
|
"stylelint": "^ 15.10.3",
|
|
76
76
|
"stylelint-config-gds": "^1.0.0"
|
|
77
77
|
},
|
|
78
78
|
"engines": {
|
|
79
|
-
"node": "^16
|
|
79
|
+
"node": "^16 || ^18 || ^20",
|
|
80
80
|
"npm": ">=8.0.0"
|
|
81
81
|
},
|
|
82
82
|
"publishConfig": {
|
|
@@ -88,6 +88,26 @@
|
|
|
88
88
|
"lcovonly"
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
|
+
"prettier": {
|
|
92
|
+
"semi": false,
|
|
93
|
+
"singleQuote": true,
|
|
94
|
+
"trailingComma": "none",
|
|
95
|
+
"overrides": [
|
|
96
|
+
{
|
|
97
|
+
"files": "*.md",
|
|
98
|
+
"options": {
|
|
99
|
+
"embeddedLanguageFormatting": "off",
|
|
100
|
+
"singleQuote": false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"files": "*.scss",
|
|
105
|
+
"options": {
|
|
106
|
+
"singleQuote": false
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
91
111
|
"stylelint": {
|
|
92
112
|
"extends": "stylelint-config-gds/scss"
|
|
93
113
|
}
|