diff --git a/package.json b/package.json index 3983bee..6b269d3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "test": "bun test", "predev": "bun run scripts/copy-docs-images.cjs", "dev": "vite dev", + "dev:port": "vite dev --port", "prebuild": "bun run generate:changelog && bun run scripts/copy-docs-images.cjs", "build": "NODE_OPTIONS=--max-old-space-size=8192 vite build && bun run scripts/generate-static-cache.ts", "build:cf": "bun run build", diff --git a/source.config.ts b/source.config.ts index a1bdbbe..09371bf 100644 --- a/source.config.ts +++ b/source.config.ts @@ -9,9 +9,12 @@ import remarkDirective from "remark-directive"; import { remarkInclude } from "fumadocs-mdx/config"; import remarkSdkFilter from "./plugins/remark-sdk-filter"; +const isDevelopment = process.env.NODE_ENV === "development"; + export const docs = defineDocs({ dir: "content/docs", docs: { + async: isDevelopment, postprocess: { includeProcessedMarkdown: true, }, diff --git a/src/routes/$.tsx b/src/routes/$.tsx index 5d815be..99bbd07 100644 --- a/src/routes/$.tsx +++ b/src/routes/$.tsx @@ -149,6 +149,7 @@ const clientLoader = browserCollections.docs.createClientLoader({ }); const SDK_PREFIXES = new Set(["ios", "android", "flutter", "expo", "react-native"]); +const NAVBAR_ONLY_TABS = new Set(["integrations", "support", "changelog"]); function parseSDKSubPath(url: string): string | null { const withoutBase = url.replace(/^\/docs\//, ""); @@ -173,10 +174,12 @@ function Page() { tree={data.pageTree} sidebar={{ tabs: { - transform: (option) => { + transform: (option, node) => { + const tabPrefix = option.url.replace(/^\/docs\//, "").split("/")[0]; + if (NAVBAR_ONLY_TABS.has(tabPrefix)) return null; + let { url } = option; if (currentSubPath && option.urls) { - const tabPrefix = url.replace(/^\/docs\//, "").split("/")[0]; if (SDK_PREFIXES.has(tabPrefix)) { const candidate = `/docs/${tabPrefix}/${currentSubPath}`; if (option.urls.has(candidate)) { diff --git a/src/styles/app.css b/src/styles/app.css index 9e380b8..cec29db 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -54,3 +54,13 @@ #nd-subnav > .overflow-auto::-webkit-scrollbar { display: none; } + +/* Fix mobile dropdown icon sizing - make SVGs fill their container. + The popover renders via a Radix portal at
, not inside #nd-sidebar, + so we target both the sidebar trigger and the portal popover separately. + Use descendant selector (not >) because icons may be wrapped in a . */ +[data-radix-popper-content-wrapper] .size-9 svg, +#nd-sidebar .size-9 svg { + width: 100%; + height: 100%; +}