Skip to content

Commit 97d72d6

Browse files
committed
remove serp footer on style guide
1 parent 2feda3c commit 97d72d6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/plugins/docsearch/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { track } from "~/util/zaraz";
22
import type { DocSearchClientOptions } from "@astrojs/starlight-docsearch";
33

4+
const isStyleGuide = window.location.pathname.startsWith("/style-guide/");
5+
46
export default {
57
appId: "D32WIYFTUF",
68
apiKey: "5cec275adc19dd3bc17617f7d9cf312a",
7-
indexName: window.location.pathname.startsWith("/style-guide/")
8-
? "prod_devdocs_styleguide"
9-
: "prod_devdocs",
9+
indexName: isStyleGuide ? "prod_devdocs_styleguide" : "prod_devdocs",
1010
insights: true,
1111
// Replace URL with the current origin so search
1212
// can be used in local development and previews.
@@ -22,6 +22,10 @@ export default {
2222
});
2323
},
2424
resultsFooterComponent({ state }) {
25+
if (isStyleGuide) {
26+
return null;
27+
}
28+
2529
return {
2630
type: "a",
2731
ref: undefined,

0 commit comments

Comments
 (0)