Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/plugins/docsearch/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { track } from "~/util/zaraz";
import type { DocSearchClientOptions } from "@astrojs/starlight-docsearch";

const isStyleGuide = window.location.pathname.startsWith("/style-guide/");

export default {
appId: "D32WIYFTUF",
apiKey: "5cec275adc19dd3bc17617f7d9cf312a",
indexName: "prod_devdocs",
indexName: isStyleGuide ? "prod_devdocs_styleguide" : "prod_devdocs",
insights: true,
// Replace URL with the current origin so search
// can be used in local development and previews.
Expand All @@ -20,6 +22,10 @@ export default {
});
},
resultsFooterComponent({ state }) {
if (isStyleGuide) {
return null;
}

return {
type: "a",
ref: undefined,
Expand Down
Loading