@x-govuk/govuk-eleventy-plugin 7.1.0 → 7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-govuk/govuk-eleventy-plugin",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "description": "Write documentation using Markdown and publish it using GOV.UK styles",
5
5
  "keywords": [
6
6
  "govuk",
@@ -2,7 +2,7 @@
2
2
  {% from "govuk/components/service-navigation/macro.njk" import govukServiceNavigation %}
3
3
 
4
4
  {{ govukServiceNavigation({
5
- classes: "app-service-navigation" + (" govuk-service-navigation--inverse" if inverseServiceNavigation) + (" " + params.classes if params.classes),
5
+ classes: "app-service-navigation" + (" govuk-service-navigation--inverse" if inverseMasthead) + (" " + params.classes if params.classes),
6
6
  attributes: params.attributes,
7
7
  ariaLabel: params.ariaLabel,
8
8
  menuButtonText: params.menuButtonText,
@@ -31,17 +31,18 @@ export function defaultPluginOptions(options, pathPrefix) {
31
31
  }
32
32
 
33
33
  // Rewrite default GOV.UK icon asset paths if rebrand enabled
34
- defaults.icons = options.rebrand
35
- ? {
36
- mask: '/assets/rebrand/images/govuk-mask-icon.svg',
37
- shortcut: '/assets/rebrand/images/favicon.ico',
38
- touch: '/assets/rebrand/images/govuk-icon-180.png'
39
- }
40
- : {
41
- mask: '/assets/images/govuk-mask-icon.svg',
42
- shortcut: '/assets/images/favicon.ico',
43
- touch: '/assets/images/govuk-icon-180.png'
44
- }
34
+ defaults.icons =
35
+ options.rebrand !== false
36
+ ? {
37
+ mask: '/assets/rebrand/images/govuk-mask-icon.svg',
38
+ shortcut: '/assets/rebrand/images/favicon.ico',
39
+ touch: '/assets/rebrand/images/govuk-icon-180.png'
40
+ }
41
+ : {
42
+ mask: '/assets/images/govuk-mask-icon.svg',
43
+ shortcut: '/assets/images/favicon.ico',
44
+ touch: '/assets/images/govuk-icon-180.png'
45
+ }
45
46
 
46
47
  // Rewrite default GOV.UK Opengraph asset path if rebrand enabled
47
48
  defaults.opengraphImageUrl = options.rebrand
package/src/index.js CHANGED
@@ -52,9 +52,8 @@ export async function govukEleventyPlugin(eleventyConfig, pluginOptions = {}) {
52
52
  eleventyConfig.addPlugin(EleventyHtmlBasePlugin)
53
53
  eleventyConfig.addPlugin(eleventyNavigation)
54
54
 
55
- // GOV.UK rebrand
56
- // Defaults to `false`; will change to `true` in a release after 25 June 2025
57
- eleventyConfig.addNunjucksGlobal('govukRebrand', options.rebrand || false)
55
+ // GOV.UK rebrand (defaults to `true`)
56
+ eleventyConfig.addNunjucksGlobal('govukRebrand', options.rebrand)
58
57
 
59
58
  // Events
60
59
  eleventyConfig.on('eleventy.after', async ({ dir }) => {
@@ -1,11 +1,11 @@
1
1
  {% extends "layouts/base.njk" %}
2
2
 
3
- {% set inverseServiceNavigation = true %}
3
+ {% set inverseMasthead = inverseMasthead | default(true) %}
4
4
 
5
5
  {% block main %}
6
6
  <main id="main-content" role="main" {%- if mainLang %} lang="{{ mainLang }}"{% endif %}>
7
7
  {{ xGovukMasthead({
8
- inverse: true,
8
+ inverse: inverseMasthead,
9
9
  title: {
10
10
  html: title | smart
11
11
  } if title,