@x-govuk/govuk-eleventy-plugin 6.3.1 → 6.4.0

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/layouts/base.njk CHANGED
@@ -60,8 +60,7 @@
60
60
  {% block pageTitle %}
61
61
  {{- title if title -}}
62
62
  {{- " (page " + pageNumber + " of " + pageCount + ")" if pageCount > 1 -}}
63
- {{- " - " + options.header.productName if options.header.productName -}}
64
- {{- " - " + options.header.organisationName -}}
63
+ {{- " - " + options.titleSuffix if options.titleSuffix -}}
65
64
  {% endblock %}
66
65
 
67
66
  {% block header %}
@@ -19,19 +19,29 @@ const defaultOptions = {
19
19
  },
20
20
  header: {
21
21
  homepageUrl: '/',
22
- organisationLogo: 'crown',
23
- organisationName: 'GOV.UK',
24
22
  productName: false
25
23
  },
26
24
  homeKey: 'Home',
27
25
  parentSite: false,
28
26
  search: false,
29
27
  stylesheets: [],
28
+ titleSuffix: 'GOV.UK',
30
29
  url: false
31
30
  }
32
31
 
33
32
  module.exports = function (options, pathPrefix) {
34
33
  options.pathPrefix = pathPrefix
35
34
 
35
+ // Support former `header.organisationName` option
36
+ // Deprecated: will be removed in v7.0
37
+ if (options.header?.organisationName) {
38
+ options.titleSuffix = options.header.organisationName
39
+ }
40
+
41
+ // Let `true` mean the default title suffix (`true` is rendered as a string)
42
+ if (options.titleSuffix === true) {
43
+ delete options.titleSuffix
44
+ }
45
+
36
46
  return deepmerge(defaultOptions, options)
37
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-govuk/govuk-eleventy-plugin",
3
- "version": "6.3.1",
3
+ "version": "6.4.0",
4
4
  "description": "Write documentation using Markdown and publish it using GOV.UK styles",
5
5
  "keywords": [
6
6
  "govuk",