Skip to content

Commit

Permalink
feat(docs): fumadocs bump & 검색 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Nov 20, 2024
1 parent e4fe838 commit 75962c5
Show file tree
Hide file tree
Showing 79 changed files with 495 additions and 794 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/cmdk-npm-1.0.0-0859ba9764-fb51a8645c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/swr-npm-2.2.5-3ab48a667d-c6e6a5bd25.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/app/(home)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode } from 'react';
import { HomeLayout } from 'fumadocs-ui/home-layout';
import { baseOptions } from '../layout.config';
import type { ReactNode } from "react";
import { HomeLayout } from "fumadocs-ui/layouts/home";
import { baseOptions } from "../layout.config";

export default function Layout({
children,
Expand Down
12 changes: 12 additions & 0 deletions docs/app/api/search/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createSearchAPI } from "fumadocs-core/search/server";
import { source } from "@/app/source";

export const { GET } = createSearchAPI("advanced", {
indexes: source.getPages().map((page) => ({
title: page.data.title,
description: page.data.description,
url: page.url,
id: page.url,
structuredData: page.data.structuredData,
})),
});
2 changes: 1 addition & 1 deletion docs/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DocsLayout } from "fumadocs-ui/layout";
import { DocsLayout } from "fumadocs-ui/layouts/docs";
import type { ReactNode } from "react";
import { docsOptions } from "../layout.config";

Expand Down
11 changes: 2 additions & 9 deletions docs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ const inter = Inter({
subsets: ["latin"],
});

const SearchDialog = () => <></>; // Temporal no-op component

export default function Layout({ children }: { children: ReactNode }) {
useThemeSync();

return (
<html
lang="en"
Expand All @@ -32,13 +31,7 @@ export default function Layout({ children }: { children: ReactNode }) {
<link rel="icon" href="/favicon.svg" />
</head>
<body>
<RootProvider
search={{
SearchDialog,
}}
>
{children}
</RootProvider>
<RootProvider search={{}}>{children}</RootProvider>
</body>
</html>
);
Expand Down
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"change-case": "^5.4.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"fumadocs-core": "13.4.10",
"fumadocs-docgen": "^1.2.0",
"fumadocs-mdx": "10.0.2",
"fumadocs-typescript": "^3.0.1",
"fumadocs-ui": "13.4.10",
"fumadocs-core": "^14.4.2",
"fumadocs-docgen": "^1.3.2",
"fumadocs-mdx": "^11.1.1",
"fumadocs-typescript": "^3.0.2",
"fumadocs-ui": "^14.4.2",
"next": "^14.2.8",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
3 changes: 2 additions & 1 deletion docs/source.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { defineDocs, defineConfig } from "fumadocs-mdx/config";
import { remarkInstall } from "fumadocs-docgen";
import { remarkStructure } from "fumadocs-core/mdx-plugins";

export const { docs, meta } = defineDocs();

export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkInstall],
remarkPlugins: [remarkInstall, remarkStructure],
},
});
Loading

0 comments on commit 75962c5

Please sign in to comment.