From 70242dcda38d6f9a416876af3913d96c6124e2d9 Mon Sep 17 00:00:00 2001 From: lhokktyn <810615+lhokktyn@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:39:37 +0000 Subject: [PATCH] Use absolute Nunjucks import path The appHeader component macro currently imports the appSiteSearch macro using a relative URL. This prevents customisation of the appSiteSearch macro using the Nunjucks import prioritisation logic. Bringing this import inline with other import syntax across the plugin fixes this issue. For example, a consuming 11ty app wants to override the appSiteSearch macro, so can now create a "_includes/components/site-search/macro.njk" template to do that. --- components/header/template.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/header/template.njk b/components/header/template.njk index 4ca77dd..3ee4f28 100644 --- a/components/header/template.njk +++ b/components/header/template.njk @@ -1,4 +1,4 @@ -{%- from "../site-search/macro.njk" import appSiteSearch -%} +{%- from "components/site-search/macro.njk" import appSiteSearch -%} {%- if options.navigation -%} {%- set headerClasses = " govuk-header--full-width-border" -%} {% elif layout == "product" or layout == "collection" %}