Skip to content

Commit 6dea488

Browse files
authored
[Docs Site] Use prod_devdocs_styleguide index on /style-guide/ (#23679)
* [Docs Site] Use prod_devdocs_styleguide index on /style-guide/ * reignore style guide * remove serp footer on style guide
1 parent 66e7ba4 commit 6dea488

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/plugins/docsearch/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +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: "prod_devdocs",
9+
indexName: isStyleGuide ? "prod_devdocs_styleguide" : "prod_devdocs",
810
insights: true,
911
// Replace URL with the current origin so search
1012
// can be used in local development and previews.
@@ -20,6 +22,10 @@ export default {
2022
});
2123
},
2224
resultsFooterComponent({ state }) {
25+
if (isStyleGuide) {
26+
return null;
27+
}
28+
2329
return {
2430
type: "a",
2531
ref: undefined,

0 commit comments

Comments
 (0)