Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
randombeeper committed Jun 14, 2024
1 parent ca3d244 commit 59544d4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export default defineConfig({
],
plugins: [
starlightDocSearch({
appId: '82VLS1TU5K',
apiKey: 'bfdc9eff848b16b6167efaa4a84d5e27',
indexName: 'fontawesome',
appId: 'FHAKRV7GHA',
apiKey: '26a8eedb0937f39c55c689e3ea6f6d68',
indexName: 'randombeeperio',
}),
],
}),
Expand Down
26 changes: 26 additions & 0 deletions testing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
recordExtractor: ({ $, helpers, url }) => {
// Remove in-page navigation components before extracting records.
$(".cards-nav").remove();

const isTutorialPage = /\/[\w-]+\/tutorial\//.test(url.pathname);
const isErrorReference = /\/[\w-]+\/reference\/errors\//.test(
url.pathname,
);

return helpers.docsearch({
recordProps: {
lvl1: "main h1",
content: "main p, main li",
lvl0: {
// Use hidden tag on docs site to extract page categories.
selectors: "#docsearch-lvl0",
defaultValue: "Learn",
},
lvl2: "main h2",
lvl3: "main h3",
lvl4: "main h4",
lvl5: "main h5",
},
indexHeadings: true,
});
}

0 comments on commit 59544d4

Please sign in to comment.