Skip to content
Closed
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
21 changes: 19 additions & 2 deletions app/(home)/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { ThemeToggle } from "fumadocs-ui/components/layout/theme-toggle";
"use client";

import { SiteLogo } from "./SiteLogo";
import Link from "next/link";
import { useTheme } from "next-themes";
import { useEffect, useState } from "react";

export function Navbar() {
const { theme, setTheme } = useTheme();
const [mounted, setMounted] = useState(false);

useEffect(() => {
setMounted(true);
}, []);

return (
<>
<div className="backdrop-blur-sm w-full h-16 px-4 flex items-center justify-between fixed top-0">
Expand All @@ -11,7 +21,14 @@ export function Navbar() {
</Link>

<div className="flex items-center space-x-4">
<ThemeToggle />
{mounted && (
<button
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
className="p-2 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700"
>
{theme === "dark" ? "🌞" : "🌙"}
</button>
)}
</div>
</div>
</>
Expand Down
7 changes: 3 additions & 4 deletions app/docs/SidebarItem.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client";

import { CratesIoLogo, NpmLogo } from "@/lib/logos";
import { type SidebarComponents } from "fumadocs-ui/layouts/docs/shared";
import { SidebarItem } from "fumadocs-ui/layouts/docs/sidebar";
import { SidebarItem } from "fumadocs-ui/components/sidebar/base";

export const components: Partial<SidebarComponents> = {
Item: ({ item }) => {
export const components = {
Item: ({ item }: any) => {
// TODO: generalise this and configure it for all revelant links
if (item.url === "/docs/rspc/client/vanilla") {
return (
Expand Down
3 changes: 1 addition & 2 deletions app/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ export default async function Page(props: {
<DocsPage
toc={page.data.toc}
full={page.data.full}
lastUpdate={page.data.lastModified}
editOnGithub={{
repo: "website",
owner: "specta-rs",
sha: "main",
path: `content/docs/${page.file.path}`,
path: `content/docs/${page.slugs.join('/')}`,
}}
>
<DocsTitle>{page.data.title}</DocsTitle>
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RootProvider } from "fumadocs-ui/provider";
import { RootProvider } from "fumadocs-ui/provider/next";
import { Metadata } from "next";
import { Inter } from "next/font/google";
import type { ReactNode } from "react";
Expand Down
6 changes: 3 additions & 3 deletions lib/source.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { docs, meta } from "@/.source";
import { docs, meta } from "../.source/server";
import { toFumadocsSource } from "fumadocs-mdx/runtime/server";
import Image from "next/image";
import { createMDXSource } from "fumadocs-mdx";
import { loader } from "fumadocs-core/source";
import { createElement } from "react";
import { CratesIoLogo, NpmLogo } from "./logos";

export const source = loader({
baseUrl: "/docs",
source: createMDXSource(docs, meta),
source: toFumadocsSource(docs, meta),
icon(icon) {
if (!icon) return;

Expand Down
35 changes: 17 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,28 @@
"postinstall": "fumadocs-mdx"
},
"dependencies": {
"fumadocs-core": "14.6.1",
"fumadocs-mdx": "11.1.2",
"fumadocs-ui": "14.6.1",
"next": "15.1.0",
"fumadocs-core": "16.2.3",
"fumadocs-mdx": "14.1.0",
"fumadocs-ui": "16.2.3",
"next": "16.0.7",
"next-sitemap": "^4.2.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"next-themes": "^0.4.6",
"react": "^19.2.1",
"react-dom": "^19.2.1"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.17",
"@types/mdx": "^2.0.13",
"@types/node": "22.10.2",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
"autoprefixer": "^10.4.20",
"eslint": "^9.17.0",
"eslint-config-next": "15.1.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2"
"@types/node": "24.10.1",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"autoprefixer": "^10.4.22",
"eslint": "^9.39.1",
"eslint-config-next": "16.0.7",
"postcss": "^8.5.6",
"tailwindcss": "^4.1.17",
"typescript": "^5.9.3"
},
"pnpm": {
"patchedDependencies": {
"fumadocs-ui": "patches/fumadocs-ui.patch"
}
}
}
13 changes: 0 additions & 13 deletions patches/fumadocs-ui.patch

This file was deleted.

Loading