@x-govuk/govuk-eleventy-plugin 5.0.4 → 5.0.6
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/document-header/template.njk +1 -2
- 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/index.js +0 -1
- package/layouts/post.njk +1 -2
- package/layouts/tags.njk +3 -3
- package/package.json +28 -5
- package/lib/collections/tag-pages.js +0 -2
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.
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
{%- if params.tags | length > 0 -%}
|
|
39
39
|
<span aria-hidden="true"> • </span>Tags:
|
|
40
40
|
{%- for tag in params.tags %}
|
|
41
|
-
|
|
42
|
-
<a href="{{ item.url }}" class="govuk-link">{{ item.data.tag }}</a>
|
|
41
|
+
<a href="/tags/{{ tag | slug }}" class="govuk-link">{{ tag }}</a>
|
|
43
42
|
{%- if not loop.last %}, {% endif %}
|
|
44
43
|
{%- endfor -%}
|
|
45
44
|
{%- endif -%}
|
|
@@ -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 {
|
package/index.js
CHANGED
|
@@ -12,7 +12,6 @@ module.exports = function (eleventyConfig, pluginOptions = {}) {
|
|
|
12
12
|
eleventyConfig.addCollection('ordered', require('./lib/collections/ordered.js'))
|
|
13
13
|
eleventyConfig.addCollection('sitemap', require('./lib/collections/sitemap.js'))
|
|
14
14
|
eleventyConfig.addCollection('tags', require('./lib/collections/tags.js'))
|
|
15
|
-
eleventyConfig.addCollection('tagPages', require('./lib/collections/tag-pages.js'))
|
|
16
15
|
|
|
17
16
|
// Extensions and template formats
|
|
18
17
|
eleventyConfig.addExtension('scss', require('./lib/extensions/scss.js'))
|
package/layouts/post.njk
CHANGED
package/layouts/tags.njk
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
}) }}
|
|
16
16
|
|
|
17
17
|
<ul class="govuk-list govuk-list--bullet">
|
|
18
|
-
{% for
|
|
18
|
+
{% for tag in collections.tags %}
|
|
19
19
|
<li>
|
|
20
|
-
<a href="{{
|
|
21
|
-
({{ collections[
|
|
20
|
+
<a href="/tags/{{ tag | slug }}">{{ tag }}</a>
|
|
21
|
+
({{ collections[tag] | length }})
|
|
22
22
|
</li>
|
|
23
23
|
{% endfor %}
|
|
24
24
|
</ul>
|
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.6",
|
|
4
4
|
"description": "Write documentation using Markdown and publish it using GOV.UK styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"govuk",
|
|
@@ -36,10 +36,11 @@
|
|
|
36
36
|
"predev": "rimraf _site",
|
|
37
37
|
"dev": "eleventy --serve --watch",
|
|
38
38
|
"start": "eleventy --serve",
|
|
39
|
-
"lint": "standard && stylelint '**/*.scss'",
|
|
39
|
+
"lint": "prettier . --check && standard && stylelint '**/*.scss'",
|
|
40
40
|
"test": "ava",
|
|
41
41
|
"test:watch": "ava --watch",
|
|
42
|
-
"coverage": "c8 ava"
|
|
42
|
+
"coverage": "c8 ava",
|
|
43
|
+
"release": "np"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"@11ty/eleventy": "^2.0.0",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"markdown-it-sup": "^1.0.0",
|
|
64
65
|
"markdown-it-table-of-contents": "^0.6.0",
|
|
65
66
|
"rimraf": "^5.0.0",
|
|
66
|
-
"rollup": "^
|
|
67
|
+
"rollup": "^4.1.0",
|
|
67
68
|
"sass": "^1.45.1",
|
|
68
69
|
"smartypants": "^0.2.0"
|
|
69
70
|
},
|
|
@@ -71,12 +72,14 @@
|
|
|
71
72
|
"@x-govuk/govuk-eleventy-plugin": "file:./",
|
|
72
73
|
"ava": "^5.1.0",
|
|
73
74
|
"c8": "^8.0.0",
|
|
75
|
+
"np": "^8.0.4",
|
|
76
|
+
"prettier": "^3.0.0",
|
|
74
77
|
"standard": "^17.0.0",
|
|
75
78
|
"stylelint": "^ 15.10.3",
|
|
76
79
|
"stylelint-config-gds": "^1.0.0"
|
|
77
80
|
},
|
|
78
81
|
"engines": {
|
|
79
|
-
"node": "^16
|
|
82
|
+
"node": "^16 || ^18 || ^20",
|
|
80
83
|
"npm": ">=8.0.0"
|
|
81
84
|
},
|
|
82
85
|
"publishConfig": {
|
|
@@ -88,6 +91,26 @@
|
|
|
88
91
|
"lcovonly"
|
|
89
92
|
]
|
|
90
93
|
},
|
|
94
|
+
"prettier": {
|
|
95
|
+
"semi": false,
|
|
96
|
+
"singleQuote": true,
|
|
97
|
+
"trailingComma": "none",
|
|
98
|
+
"overrides": [
|
|
99
|
+
{
|
|
100
|
+
"files": "*.md",
|
|
101
|
+
"options": {
|
|
102
|
+
"embeddedLanguageFormatting": "off",
|
|
103
|
+
"singleQuote": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"files": "*.scss",
|
|
108
|
+
"options": {
|
|
109
|
+
"singleQuote": false
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
91
114
|
"stylelint": {
|
|
92
115
|
"extends": "stylelint-config-gds/scss"
|
|
93
116
|
}
|