Skip to content

Commit ec808ff

Browse files
fix(web): remove LLM page actions and related routes
1 parent 54c4af6 commit ec808ff

File tree

14 files changed

+78
-322
lines changed

14 files changed

+78
-322
lines changed

apps/web/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ yarn-error.log*
2828
.env*.local
2929
.vercel
3030
next-env.d.ts
31+
.dev.vars
3132

3233
analytics-data.json

apps/web/content/docs/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"pages": [
33
"index",
4-
"---Getting Started---",
54
"installation",
65
"quick-start",
76
"project-structure",

apps/web/next.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ const config = {
3030
source: "/ingest/decide",
3131
destination: "https://us.i.posthog.com/decide",
3232
},
33-
{
34-
source: "/docs/:path*.mdx",
35-
destination: "/llms.mdx/:path*",
36-
},
3733
];
3834
},
3935
};
4036

4137
export default withMDX(config);
38+
39+
import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";
40+
41+
initOpenNextCloudflareForDev();

apps/web/public/_headers

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/_next/static/*
2+
Cache-Control: public,max-age=31536000,immutable

apps/web/public/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
"biome",
9494
"husky",
9595
"turborepo",
96+
"fumadocs",
97+
"ultracite",
98+
"oxlint",
9699
"none"
97100
]
98101
},

apps/web/src/app/docs/[[...slug]]/page.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
DocsTitle,
88
} from "fumadocs-ui/page";
99
import { notFound } from "next/navigation";
10-
import { LLMCopyButton, ViewOptions } from "@/components/ai/page-actions";
1110
import { source } from "@/lib/source";
1211

1312
export default async function Page(props: {
@@ -23,13 +22,6 @@ export default async function Page(props: {
2322
<DocsPage toc={page.data.toc} full={page.data.full}>
2423
<DocsTitle>{page.data.title}</DocsTitle>
2524
<DocsDescription>{page.data.description}</DocsDescription>
26-
<div className="flex flex-row items-center gap-2 border-b pt-2 pb-6">
27-
<LLMCopyButton markdownUrl={`${page.url}.mdx`} />
28-
<ViewOptions
29-
markdownUrl={`${page.url}.mdx`}
30-
githubUrl={`https://github.com/amanvarshney01/create-better-t-stack/blob/dev/apps/docs/content/docs/${page.path}`}
31-
/>
32-
</div>
3325
<DocsBody>
3426
<MDX components={{ ...defaultMdxComponents, ...TabsComponents }} />
3527
</DocsBody>

apps/web/src/app/docs/layout.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
import { Banner } from "fumadocs-ui/components/banner";
2-
import { DocsLayout } from "fumadocs-ui/layouts/docs";
2+
import { DocsLayout, type DocsLayoutProps } from "fumadocs-ui/layouts/docs";
33
import type { ReactNode } from "react";
4-
import { baseOptions } from "@/app/layout.config";
4+
import { baseOptions, links } from "@/app/layout.config";
55
import { source } from "@/lib/source";
66

7+
const docsOptions: DocsLayoutProps = {
8+
...baseOptions,
9+
tree: source.pageTree,
10+
links: links.filter((link) => "text" in link && link.text !== "Docs"),
11+
};
12+
713
export default function Layout({ children }: { children: ReactNode }) {
814
return (
915
<>
1016
<Banner variant="rainbow">
1117
⚠️ WORK IN PROGRESS DONT TAKE REFERENCE!!!
1218
</Banner>
13-
<DocsLayout tree={source.pageTree} {...baseOptions}>
14-
{children}
15-
</DocsLayout>
19+
<DocsLayout {...docsOptions}>{children}</DocsLayout>
1620
</>
1721
);
1822
}

apps/web/src/app/layout.config.tsx

Lines changed: 57 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
1+
import type { BaseLayoutProps, LinkItemType } from "fumadocs-ui/layouts/shared";
22
import Image from "next/image";
33
import discordLogo from "@/public/icon/discord.svg";
44
import npmLogo from "@/public/icon/npm.svg";
@@ -16,6 +16,61 @@ export const logo = (
1616
</>
1717
);
1818

19+
export const links: LinkItemType[] = [
20+
{
21+
text: "Docs",
22+
url: "/docs",
23+
active: "nested-url" as const,
24+
},
25+
{
26+
text: "Builder",
27+
url: "/new",
28+
},
29+
{
30+
text: "Analytics",
31+
url: "/analytics",
32+
},
33+
{
34+
text: "Showcase",
35+
url: "/showcase",
36+
},
37+
{
38+
text: "NPM",
39+
icon: (
40+
<Image src={npmLogo} alt="npm" className="size-4 invert-0 dark:invert" />
41+
),
42+
label: "NPM",
43+
type: "icon",
44+
url: "https://www.npmjs.com/package/create-better-t-stack",
45+
external: true,
46+
secondary: true,
47+
},
48+
{
49+
text: "X",
50+
icon: <Image src={xLogo} alt="x" className="size-4 invert dark:invert-0" />,
51+
label: "X",
52+
type: "icon",
53+
url: "https://x.com/amanvarshney01",
54+
external: true,
55+
secondary: true,
56+
},
57+
{
58+
text: "Discord",
59+
icon: (
60+
<Image
61+
src={discordLogo}
62+
alt="discord"
63+
className="size-5 invert-0 dark:invert"
64+
/>
65+
),
66+
label: "Discord",
67+
type: "icon",
68+
url: "https://discord.gg/ZYsbjpDaM5",
69+
external: true,
70+
secondary: true,
71+
},
72+
];
73+
1974
export const baseOptions: BaseLayoutProps = {
2075
nav: {
2176
title: (
@@ -26,66 +81,7 @@ export const baseOptions: BaseLayoutProps = {
2681
</span>
2782
</>
2883
),
29-
// enabled: false,
3084
},
31-
links: [
32-
{
33-
text: "Docs",
34-
url: "/docs",
35-
},
36-
{
37-
text: "Builder",
38-
url: "/new",
39-
},
40-
{
41-
text: "Analytics",
42-
url: "/analytics",
43-
},
44-
{
45-
text: "Showcase",
46-
url: "/showcase",
47-
},
48-
{
49-
text: "NPM",
50-
icon: (
51-
<Image
52-
src={npmLogo}
53-
alt="npm"
54-
className="size-4 invert-0 dark:invert"
55-
/>
56-
),
57-
label: "NPM",
58-
type: "icon",
59-
url: "https://www.npmjs.com/package/create-better-t-stack",
60-
external: true,
61-
secondary: true,
62-
},
63-
{
64-
text: "X",
65-
icon: (
66-
<Image src={xLogo} alt="x" className="size-4 invert dark:invert-0" />
67-
),
68-
label: "X",
69-
type: "icon",
70-
url: "https://x.com/amanvarshney01",
71-
external: true,
72-
secondary: true,
73-
},
74-
{
75-
text: "Discord",
76-
icon: (
77-
<Image
78-
src={discordLogo}
79-
alt="discord"
80-
className="size-5 invert-0 dark:invert"
81-
/>
82-
),
83-
label: "Discord",
84-
type: "icon",
85-
url: "https://discord.gg/ZYsbjpDaM5",
86-
external: true,
87-
secondary: true,
88-
},
89-
],
85+
links: links,
9086
githubUrl: "https://github.com/AmanVarshney01/create-better-t-stack",
9187
};

apps/web/src/app/llms-full.txt/route.ts

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

apps/web/src/app/llms.mdx/[[...slug]]/route.ts

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

0 commit comments

Comments
 (0)