Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions source.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
7 changes: 5 additions & 2 deletions src/routes/$.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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\//, "");
Expand All @@ -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)) {
Expand Down
10 changes: 10 additions & 0 deletions src/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 <body>, 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 <span>. */
[data-radix-popper-content-wrapper] .size-9 svg,
#nd-sidebar .size-9 svg {
width: 100%;
height: 100%;
}
Loading