这是indexloc提供的服务,不要输入任何密码
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
3 changes: 3 additions & 0 deletions docs/site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ content/openapi/artifacts/*
!content/openapi/artifacts/index.mdx
!content/openapi/index.mdx

# Generated data files
content/examples-data.json

.source
/public/*.st
/public/*.toml
Expand Down
16 changes: 5 additions & 11 deletions docs/site/app/(no-sidebar)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { ReactNode } from "react";
import { HomeLayout as FumaLayout } from "fumadocs-ui/layouts/home";
import { navLinks } from "@/lib/nav-links";
import { HomeLayout } from "fumadocs-ui/layouts/home";
import { FaviconHandler } from "../_components/favicon-handler";
import { TitleLogos } from "@/components/TitleLogos";
import { baseOptions } from "../layout-config";

export default function Layout({
children,
Expand All @@ -12,15 +11,10 @@ export default function Layout({
return (
<>
<FaviconHandler />
<FumaLayout
githubUrl="https://github.com/vercel/turborepo"
links={navLinks}
nav={{
title: <TitleLogos />,
}}
>
{/* @ts-expect-error */}
<HomeLayout className="p-0" {...baseOptions}>
{children}
</FumaLayout>
</HomeLayout>
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "fumadocs-ui/page";
import { notFound } from "next/navigation";
import defaultMdxComponents from "fumadocs-ui/mdx";
import { openapi, openapiPages } from "@/app/source";
import { openapi, openapiPages } from "../../../source";
// eslint-disable-next-line rulesdir/global-css
import "./openapi.css";

Expand Down
30 changes: 16 additions & 14 deletions docs/site/app/(openapi)/repo/docs/openapi/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import type { ReactNode } from "react";
import { DocsLayout } from "fumadocs-ui/layouts/docs";
import { layoutPropsWithSidebar } from "@/app/_components/inner-layout-props";
import { openapiPages } from "@/app/source";
import { DocsLayout } from "@/components/docs-layout";
import { baseOptions } from "../../../../layout-config";
import { Navigation } from "@/components/nav";
import { Sidebar } from "#/components/docs-layout/sidebar";
import { openapiPages } from "../../source";

export default function Layout({
export default async function Layout({
children,
}: {
children: ReactNode;
}): JSX.Element {
children: React.ReactNode;
}) {
return (
<DocsLayout
{...layoutPropsWithSidebar}
sidebar={{ defaultOpenLevel: 3, collapsible: false }}
tree={openapiPages.pageTree}
>
{children}
</DocsLayout>
<>
<Navigation />
<Sidebar>
<DocsLayout isOpenApiSpec tree={openapiPages.pageTree} {...baseOptions}>
{children}
</DocsLayout>
</Sidebar>
</>
);
}
9 changes: 0 additions & 9 deletions docs/site/app/(openapi)/repo/layout.tsx

This file was deleted.

14 changes: 14 additions & 0 deletions docs/site/app/(openapi)/repo/source.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { createMDXSource } from "fumadocs-mdx";
import { createOpenAPI, attachFile } from "fumadocs-openapi/server";
import { loader } from "fumadocs-core/source";
import { openapiDocs, openapiMeta } from "@/.source";

export const openapiPages = loader({
baseUrl: "/repo/docs/openapi",
source: createMDXSource(openapiDocs, openapiMeta),
pageTree: {
attachFile,
},
});

export const openapi = createOpenAPI();
21 changes: 14 additions & 7 deletions docs/site/app/(sidebar)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import type { ReactNode } from "react";
import { FaviconHandler } from "../_components/favicon-handler";
import { DocsLayout } from "@/components/docs-layout";
import { repoDocsPages } from "@/app/source";
import { baseOptions } from "../layout-config";
import { Navigation } from "@/components/nav";
import { RedirectsHandler } from "./redirects-handler";
import { Sidebar } from "#/components/docs-layout/sidebar";

export default function Layout({
export default async function Layout({
children,
}: {
children: ReactNode;
}): JSX.Element {
children: React.ReactNode;
}) {
return (
<>
<Navigation />
<Sidebar>
<DocsLayout tree={repoDocsPages.pageTree} {...baseOptions}>
{children}
</DocsLayout>
</Sidebar>
<RedirectsHandler />
<FaviconHandler />
{children}
</>
);
}
14 changes: 1 addition & 13 deletions docs/site/app/(sidebar)/repo/docs/[[...slug]]/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { DocsPage, DocsBody } from "fumadocs-ui/page";
import { notFound } from "next/navigation";
import { FeedbackWidget } from "@/components/feedback-widget";
import { repoDocsPages } from "@/app/source";
import { RemoteCacheCounter } from "@/components/remote-cache-counter";

export default async function SlugLayout(props: {
params: Promise<{ slug?: string[] }>;
Expand All @@ -19,17 +17,7 @@ export default async function SlugLayout(props: {
}

return (
<DocsPage
tableOfContent={{
header: (
<>
<RemoteCacheCounter />
<FeedbackWidget />
</>
),
}}
toc={page.data.toc}
>
<DocsPage>
<DocsBody>{children}</DocsBody>
</DocsPage>
);
Expand Down
5 changes: 3 additions & 2 deletions docs/site/app/(sidebar)/repo/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export async function generateMetadata(props: {

return createMetadata({
title: page.data.title,
product: "repo",
description: page.data.description,
canonicalPath: page.url,
});
Expand All @@ -42,7 +41,9 @@ export default async function Page(props: {
return (
<>
<SystemEnvironmentVariablesHashHighlighter />
<h1 className="text-left">{page.data.title}</h1>
<h1 className="scroll-m-7 text-4xl font-semibold tracking-normal">
{page.data.title}
</h1>
<Mdx components={mdxComponents} />
</>
);
Expand Down
16 changes: 0 additions & 16 deletions docs/site/app/(sidebar)/repo/layout.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions docs/site/app/_components/inner-layout-props.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions docs/site/app/api/remote-cache-minutes-saved/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export const getRemoteCacheSavedMinutes =
async (): Promise<TurborepoMinutesSaved> => {
if (!process.env.VERCEL && !process.env.TINYBIRD_TIME_SAVED_TOKEN) {
return {
total: 100000,
remoteCacheMinutesSaved: 50000,
localCacheMinutesSaved: 50000,
total: 100000000,
remoteCacheMinutesSaved: 50000000,
localCacheMinutesSaved: 50000000,
};
}

Expand Down
Loading
Loading