@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 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
- * 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
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
- * [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
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.
@@ -13,7 +13,7 @@
13
13
  font-variant: all-small-caps;
14
14
  font-weight: normal;
15
15
  margin-left: govuk-spacing(1);
16
- opacity: .5;
16
+ opacity: 0.5;
17
17
  }
18
18
  }
19
19
 
@@ -34,11 +34,11 @@
34
34
  }
35
35
 
36
36
  sup {
37
- top: -.4em;
37
+ top: -0.4em;
38
38
  }
39
39
 
40
40
  sub {
41
- bottom: -.4em;
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 {
@@ -115,7 +115,7 @@ $icon-size: 40px;
115
115
  }
116
116
 
117
117
  .app-site-search__menu--overlay {
118
- box-shadow: rgba(govuk-colour("black"), .25) 0 2px 6px;
118
+ box-shadow: rgba(govuk-colour("black"), 0.25) 0 2px 6px;
119
119
  left: 0;
120
120
  position: absolute;
121
121
  top: 100%;
@@ -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 the last two words of a string. This
5
- * prevents an orphaned word appearing by itself at the end of a paragraph.
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Definition list
2
+ * Render a definition list
3
3
  *
4
4
  * @param {Function} md - markdown-it instance
5
5
  * @returns {Function} - markdown-it rendering rules
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Footnotes
2
+ * Render footnotes
3
3
  *
4
4
  * @param {Function} md - markdown-it instance
5
5
  * @returns {Function} - markdown-it rendering rules
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Table of contents
2
+ * Render a table of contents
3
3
  *
4
4
  * @param {Function} md - markdown-it instance
5
5
  * @returns {Function} - markdown-it rendering rules
@@ -1,7 +1,5 @@
1
1
  /**
2
- * Responsive tables
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.5",
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": "ava",
41
- "test:watch": "ava --watch",
42
- "coverage": "c8 ava"
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": "^1.0.4",
54
+ "markdown-it-abbr": "^2.0.0",
55
55
  "markdown-it-anchor": "^8.4.1",
56
- "markdown-it-deflist": "^2.1.0",
57
- "markdown-it-footnote": "^3.0.3",
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": "^3.0.1",
61
- "markdown-it-mark": "^3.0.1",
62
- "markdown-it-sub": "^1.0.0",
63
- "markdown-it-sup": "^1.0.0",
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": "^3.9.0",
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
- "ava": "^5.1.0",
73
- "c8": "^8.0.0",
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.0.0 || ^18.0.0",
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
  }