diff --git a/dist/index.js b/dist/index.js index 8bc5c9d19987f1995266503a5041124c0a83108f..74dc8add706d827e188b941df6f5b4c325af805a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2907,7 +2907,7 @@ function Tabs2({ // src/define-config.tsx import { useRouter as useRouter3 } from "next/router"; -import { Navbar, useConfig } from "nextra-theme-docs"; +import { Navbar, useConfig, Flexsearch } from "nextra-theme-docs"; import { Fragment as Fragment8, jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime"; function defineConfig({ siteName: originalSiteName, @@ -2937,12 +2937,16 @@ function defineConfig({ }, navbar: { component: (props) => /* @__PURE__ */ jsxs31(Fragment8, { children: [ - /* @__PURE__ */ jsx45(Header, { accentColor: "#1cc8ee", searchBarProps: { version: "v2" } }), + /* @__PURE__ */ jsx45(Header, { accentColor: "#1cc8ee", searchBarProps: { version: "v2" }, search: false }), /* @__PURE__ */ jsx45(Navbar, { ...props }) ] }) }, search: { - component: null + component: props => jsx45(Flexsearch, { ...props }), + emptyResult: () => jsx45("span", { className: "nx-block nx-select-none nx-p-8 nx-text-center nx-text-sm nx-text-gray-400", children: "No results found." }), + error: "Failed to load search index.", + loading: () => jsxs31(Fragment8, { children: ["Loading…"] }), + placeholder:() => "Search documentation…", }, sidebar: { defaultMenuCollapseLevel: 1, diff --git a/dist/next.config.mjs b/dist/next.config.mjs index 88622019e45209f9e7d07f97ab47cc5b3b3a0db1..b214f983119d770e0916c97d42ce133825a9c4c8 100644 --- a/dist/next.config.mjs +++ b/dist/next.config.mjs @@ -70,7 +70,9 @@ var withGuildDocs = ({ mdxOptions: { remarkPlugins: defaultRemarkPlugins }, - flexsearch: false + flexsearch: { + codeblocks: false + }, }); const siteUrl = process.env.SITE_URL || ""; return withBundleAnalyzer(