diff --git a/lib/metalsmith-lunr-index/index.js b/lib/metalsmith-lunr-index/index.js
index fe1e7d0f4d..f8885b860c 100644
--- a/lib/metalsmith-lunr-index/index.js
+++ b/lib/metalsmith-lunr-index/index.js
@@ -5,10 +5,6 @@ const navigationConfig = require('../../config/navigation')
module.exports = function lunrPlugin() {
return (files, metalsmith, done) => {
const outputPath = 'search-index.json'
-
- const separator =
- '›'
-
const includedSections = navigationConfig
.filter((section) => !section.ignoreInSearch)
.map((section) => section.label)
@@ -88,7 +84,7 @@ module.exports = function lunrPlugin() {
store[doc.permalink] = {
permalink: doc.permalink,
title: doc.title,
- section: doc.section,
+ section: `in ${doc.section}`,
aliases: doc.aliases
}
this.add(doc)
@@ -98,7 +94,7 @@ module.exports = function lunrPlugin() {
store[doc.permalink] = {
permalink: doc.permalink,
title: doc.title,
- section: `${doc.section}${separator}${doc.page}`,
+ section: `, Part of ${doc.page} in ${doc.section}`,
aliases: doc.aliases
}
this.add(doc)
diff --git a/src/javascripts/components/search.mjs b/src/javascripts/components/search.mjs
index c82780b212..83afe767ed 100644
--- a/src/javascripts/components/search.mjs
+++ b/src/javascripts/components/search.mjs
@@ -234,11 +234,6 @@ class Search extends Component {
section.className = 'app-site-search--section'
section.innerHTML = result.section
- const visuallyHiddenComma = document.createElement('span')
- visuallyHiddenComma.className = 'govuk-visually-hidden'
- visuallyHiddenComma.innerHTML = ', '
-
- elem.appendChild(visuallyHiddenComma)
elem.appendChild(section)
return elem.innerHTML
}
diff --git a/src/stylesheets/components/_site-search.scss b/src/stylesheets/components/_site-search.scss
index cf0c231876..b963d363c7 100644
--- a/src/stylesheets/components/_site-search.scss
+++ b/src/stylesheets/components/_site-search.scss
@@ -303,9 +303,3 @@ $icon-size: 40px;
content: ")";
}
}
-
-.app-site-search__separator {
- display: inline-block;
- margin-right: govuk-spacing(1);
- margin-left: govuk-spacing(1);
-}