Skip to content

Commit edcd6d2

Browse files
Merge pull request #2 from muppet-dev/feat/fuma
feat: added fuma docs
2 parents c38a33a + 4710750 commit edcd6d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2653
-1836
lines changed

docs/.gitignore

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
# build output
2-
dist/
3-
# generated types
4-
.astro/
1+
# deps
2+
/node_modules
53

6-
# dependencies
7-
node_modules/
4+
# generated content
5+
.contentlayer
6+
.content-collections
7+
.source
88

9-
# logs
9+
# test & build
10+
/coverage
11+
/.next/
12+
/out/
13+
/build
14+
*.tsbuildinfo
15+
16+
# misc
17+
.DS_Store
18+
*.pem
19+
/.pnp
20+
.pnp.js
1021
npm-debug.log*
1122
yarn-debug.log*
1223
yarn-error.log*
13-
pnpm-debug.log*
14-
1524

16-
# environment variables
17-
.env
18-
.env.production
19-
20-
# macOS-specific files
21-
.DS_Store
25+
# others
26+
.env*.local
27+
.vercel
28+
next-env.d.ts

docs/.vscode/extensions.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/.vscode/launch.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/app/api/search/route.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { source } from '@/lib/source';
2+
import { createFromSource } from 'fumadocs-core/search/server';
3+
4+
export const { GET } = createFromSource(source);

docs/app/docs/[[...slug]]/page.tsx

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { source } from "@/lib/source";
2+
import {
3+
DocsPage,
4+
DocsBody,
5+
DocsDescription,
6+
DocsTitle,
7+
} from "fumadocs-ui/page";
8+
import { notFound } from "next/navigation";
9+
import defaultMdxComponents, { createRelativeLink } from "fumadocs-ui/mdx";
10+
11+
export default async function Page(props: {
12+
params: Promise<{ slug?: string[] }>;
13+
}) {
14+
const params = await props.params;
15+
const page = source.getPage(params.slug);
16+
if (!page) notFound();
17+
18+
const MDXContent = page.data.body;
19+
20+
return (
21+
<DocsPage
22+
toc={page.data.toc}
23+
full={page.data.full}
24+
editOnGithub={{
25+
owner: "muppet-dev",
26+
repo: "muppet",
27+
sha: "main",
28+
path: `/docs/content/docs/${page.file.path}`,
29+
}}
30+
>
31+
<DocsTitle>{page.data.title}</DocsTitle>
32+
<DocsDescription>{page.data.description}</DocsDescription>
33+
<DocsBody>
34+
<MDXContent
35+
components={{
36+
...defaultMdxComponents,
37+
// this allows you to link to other pages with relative file paths
38+
a: createRelativeLink(source, page),
39+
// you can add other MDX components here
40+
}}
41+
/>
42+
</DocsBody>
43+
</DocsPage>
44+
);
45+
}
46+
47+
export async function generateStaticParams() {
48+
return source.generateParams();
49+
}
50+
51+
export async function generateMetadata(props: {
52+
params: Promise<{ slug?: string[] }>;
53+
}) {
54+
const params = await props.params;
55+
const page = source.getPage(params.slug);
56+
if (!page) notFound();
57+
58+
return {
59+
title: page.data.title,
60+
description: page.data.description,
61+
};
62+
}

docs/app/docs/layout.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { DocsLayout } from "fumadocs-ui/layouts/docs";
2+
import type { ReactNode } from "react";
3+
import { baseOptions } from "@/app/layout.config";
4+
import { source } from "@/lib/source";
5+
6+
export default function Layout({ children }: { children: ReactNode }) {
7+
return (
8+
<DocsLayout tree={source.pageTree} {...baseOptions}>
9+
{children}
10+
</DocsLayout>
11+
);
12+
}

docs/app/favicon.ico

14.7 KB
Binary file not shown.

docs/app/global.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import 'tailwindcss';
2+
@import 'fumadocs-ui/css/neutral.css';
3+
@import 'fumadocs-ui/css/preset.css';
4+
5+
@source '../node_modules/fumadocs-ui/dist/**/*.js';

docs/app/layout.config.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { Logo } from "@/components/Logo";
2+
import { FaBluesky, FaXTwitter } from "react-icons/fa6";
3+
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
4+
5+
/**
6+
* Shared layout configurations
7+
*
8+
* you can customise layouts individually from:
9+
* Home Layout: app/(home)/layout.tsx
10+
* Docs Layout: app/docs/layout.tsx
11+
*/
12+
export const baseOptions: BaseLayoutProps = {
13+
nav: {
14+
title: <Logo />,
15+
},
16+
links: [
17+
{
18+
type: "icon",
19+
icon: <FaBluesky />,
20+
text: "X",
21+
url: "https://x.com/muppetdev",
22+
},
23+
{
24+
type: "icon",
25+
icon: <FaXTwitter />,
26+
text: "BlueSky",
27+
url: "https://bsky.app/profile/muppet.dev",
28+
},
29+
],
30+
githubUrl: "https://github.com/muppet-dev/muppet",
31+
};

docs/app/layout.tsx

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import "./global.css";
2+
import { RootProvider } from "fumadocs-ui/provider";
3+
import type { Metadata } from "next";
4+
import { Geist } from "next/font/google";
5+
import SeoBanner from "@/public/banner.png";
6+
import type { ReactNode } from "react";
7+
8+
const inter = Geist({
9+
subsets: ["latin"],
10+
});
11+
12+
export function generateMetadata(): Metadata {
13+
const title = {
14+
template: "%s | muppet",
15+
default: "muppet - Toolkit for building MCPs",
16+
};
17+
const description =
18+
"Muppet is an open toolkit which standardizes the way you build, test, and deploy your MCPs. If MCP is the USB-C port for AI applications, think of Muppet as the assembly line that produces the USB-C port.";
19+
20+
return {
21+
title,
22+
description,
23+
keywords: [
24+
"MCP",
25+
"MCPs",
26+
"MCP toolkit",
27+
"MCP development",
28+
"Honojs",
29+
"toolkit",
30+
"javascript",
31+
"typescript",
32+
"hono",
33+
],
34+
metadataBase: new URL("https://muppet.dev"),
35+
category: "education",
36+
twitter: {
37+
card: "summary_large_image",
38+
title,
39+
description,
40+
images: {
41+
width: SeoBanner.width,
42+
height: SeoBanner.height,
43+
url: SeoBanner.src,
44+
},
45+
},
46+
openGraph: {
47+
title,
48+
description,
49+
images: {
50+
width: SeoBanner.width,
51+
height: SeoBanner.height,
52+
url: SeoBanner.src,
53+
},
54+
siteName: "Muppet Docs",
55+
url: "/",
56+
locale: "en_US",
57+
type: "website",
58+
},
59+
};
60+
}
61+
62+
export default function Layout({ children }: { children: ReactNode }) {
63+
return (
64+
<html lang="en" className={inter.className} suppressHydrationWarning>
65+
<body className="flex flex-col min-h-screen">
66+
<RootProvider>{children}</RootProvider>
67+
</body>
68+
</html>
69+
);
70+
}

0 commit comments

Comments
 (0)