Skip to content

Commit 26221ae

Browse files
authored
chore: use next/link in footer (langfuse#410)
1 parent e9e5e97 commit 26221ae

File tree

2 files changed

+168
-160
lines changed

2 files changed

+168
-160
lines changed

components/FooterMenu.tsx

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
import Link from "next/link";
2+
3+
const menuItems = [
4+
{
5+
heading: "Platform",
6+
items: [
7+
{
8+
name: "LLM Tracing",
9+
href: "/docs/tracing/overview",
10+
},
11+
{
12+
name: "Prompt Management",
13+
href: "/docs/prompts/get-started",
14+
},
15+
{
16+
name: "Evaluation",
17+
href: "/docs/scores/overview",
18+
},
19+
{
20+
name: "Datasets",
21+
href: "/docs/datasets/overview",
22+
},
23+
{
24+
name: "Metrics",
25+
href: "/docs/analytics",
26+
},
27+
],
28+
},
29+
{
30+
heading: "Integrations",
31+
items: [
32+
{
33+
name: "Python SDK",
34+
href: "/docs/sdk/python",
35+
},
36+
{
37+
name: "JS/TS SDK",
38+
href: "/docs/sdk/typescript",
39+
},
40+
{
41+
name: "OpenAI SDK",
42+
href: "/docs/integrations/openai/get-started",
43+
},
44+
{
45+
name: "Langchain",
46+
href: "/docs/integrations/langchain/tracing",
47+
},
48+
{
49+
name: "Llama-Index",
50+
href: "/docs/integrations/llama-index/get-started",
51+
},
52+
{
53+
name: "Litellm",
54+
href: "/docs/integrations/litellm",
55+
},
56+
{
57+
name: "Flowise",
58+
href: "/docs/integrations/flowise",
59+
},
60+
{
61+
name: "Langflow",
62+
href: "/docs/integrations/langflow",
63+
},
64+
{
65+
name: "API",
66+
href: "https://api.reference.langfuse.com/",
67+
},
68+
],
69+
},
70+
{
71+
heading: "Resources",
72+
items: [
73+
{ name: "Documentation", href: "/docs" },
74+
{
75+
name: "Changelog",
76+
href: "/changelog",
77+
},
78+
{
79+
name: "Interactive Demo",
80+
href: "/demo",
81+
},
82+
{
83+
name: "Pricing",
84+
href: "/pricing",
85+
},
86+
{
87+
name: "Status",
88+
href: "https://status.langfuse.com",
89+
},
90+
{
91+
name: "Self-hosting",
92+
href: "/docs/deployment/self-host",
93+
},
94+
{
95+
name: "Open Source",
96+
href: "/docs/open-source",
97+
},
98+
],
99+
},
100+
{
101+
heading: "About",
102+
items: [
103+
{ name: "Blog", href: "/blog" },
104+
{ name: "Careers", href: "/careers" },
105+
{ name: "Contact", href: "mailto:support@langfuse.com" },
106+
{
107+
name: "Schedule Demo",
108+
href: "/schedule-demo",
109+
},
110+
{
111+
name: "OSS Friends",
112+
href: "/oss-friends",
113+
},
114+
],
115+
},
116+
117+
{
118+
heading: "Legal",
119+
items: [
120+
{ name: "Security", href: "/security" },
121+
{ name: "Imprint", href: "/imprint" },
122+
{
123+
name: "Terms",
124+
href: "/tos",
125+
},
126+
{
127+
name: "Privacy",
128+
href: "/privacy",
129+
},
130+
],
131+
},
132+
];
133+
134+
const FooterMenu = () => {
135+
return (
136+
<div className="w-full">
137+
<div className="grid grid-cols-2 md:grid-cols-5 text-base gap-y-8 gap-x-2">
138+
{menuItems.map((menu) => (
139+
<div key={menu.heading}>
140+
<p className="pb-2 font-mono font-bold text-primary">
141+
{menu.heading}
142+
</p>
143+
<ul className="flex flex-col gap-2">
144+
{menu.items.map((item) => (
145+
<li key={item.name}>
146+
<Link
147+
href={item.href}
148+
className="text-sm leading-tight hover:text-primary/80"
149+
>
150+
{item.name}
151+
</Link>
152+
</li>
153+
))}
154+
</ul>
155+
</div>
156+
))}
157+
<div />
158+
</div>
159+
<div className="my-8 font-mono text-sm">
160+
© 2022-{new Date().getFullYear()} Finto Technologies
161+
</div>
162+
</div>
163+
);
164+
};
165+
166+
export default FooterMenu;

theme.config.tsx

Lines changed: 2 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -17,137 +17,7 @@ import { ToAppButton } from "./components/ToAppButton";
1717
import { COOKBOOK_ROUTE_MAPPING } from "./lib/cookbook_route_mapping";
1818
import { GeistSans } from "geist/font/sans";
1919
import IconDiscord from "./components/icons/discord";
20-
21-
const footerMenu = [
22-
{
23-
heading: "Platform",
24-
items: [
25-
{
26-
name: "LLM Tracing",
27-
href: "/docs/tracing/overview",
28-
},
29-
{
30-
name: "Prompt Management",
31-
href: "/docs/prompts/get-started",
32-
},
33-
{
34-
name: "Evaluation",
35-
href: "/docs/scores/overview",
36-
},
37-
{
38-
name: "Datasets",
39-
href: "/docs/datasets/overview",
40-
},
41-
{
42-
name: "Metrics",
43-
href: "/docs/analytics",
44-
},
45-
],
46-
},
47-
{
48-
heading: "Integrations",
49-
items: [
50-
{
51-
name: "Python SDK",
52-
href: "/docs/sdk/python",
53-
},
54-
{
55-
name: "JS/TS SDK",
56-
href: "/docs/sdk/typescript",
57-
},
58-
{
59-
name: "OpenAI SDK",
60-
href: "/docs/integrations/openai/get-started",
61-
},
62-
{
63-
name: "Langchain",
64-
href: "/docs/integrations/langchain/tracing",
65-
},
66-
{
67-
name: "Llama-Index",
68-
href: "/docs/integrations/llama-index/get-started",
69-
},
70-
{
71-
name: "Litellm",
72-
href: "/docs/integrations/litellm",
73-
},
74-
{
75-
name: "Flowise",
76-
href: "/docs/integrations/flowise",
77-
},
78-
{
79-
name: "Langflow",
80-
href: "/docs/integrations/langflow",
81-
},
82-
{
83-
name: "API",
84-
href: "https://api.reference.langfuse.com/",
85-
},
86-
],
87-
},
88-
{
89-
heading: "Resources",
90-
items: [
91-
{ name: "Documentation", href: "/docs" },
92-
{
93-
name: "Changelog",
94-
href: "/changelog",
95-
},
96-
{
97-
name: "Interactive Demo",
98-
href: "/demo",
99-
},
100-
{
101-
name: "Pricing",
102-
href: "/pricing",
103-
},
104-
{
105-
name: "Status",
106-
href: "https://status.langfuse.com",
107-
},
108-
{
109-
name: "Self-hosting",
110-
href: "/docs/deployment/self-host",
111-
},
112-
{
113-
name: "Open Source",
114-
href: "/docs/open-source",
115-
},
116-
],
117-
},
118-
{
119-
heading: "About",
120-
items: [
121-
{ name: "Blog", href: "/blog" },
122-
{ name: "Careers", href: "/careers" },
123-
{ name: "Contact", href: "mailto:support@langfuse.com" },
124-
{
125-
name: "Schedule Demo",
126-
href: "/schedule-demo",
127-
},
128-
{
129-
name: "OSS Friends",
130-
href: "/oss-friends",
131-
},
132-
],
133-
},
134-
135-
{
136-
heading: "Legal",
137-
items: [
138-
{ name: "Security", href: "/security" },
139-
{ name: "Imprint", href: "/imprint" },
140-
{
141-
name: "Terms",
142-
href: "/tos",
143-
},
144-
{
145-
name: "Privacy",
146-
href: "/privacy",
147-
},
148-
],
149-
},
150-
];
20+
import FooterMenu from "./components/FooterMenu";
15121

15222
const config: DocsThemeConfig = {
15323
logo: <Logo />,
@@ -204,35 +74,7 @@ const config: DocsThemeConfig = {
20474
},
20575
docsRepositoryBase: "https://github.com/langfuse/langfuse-docs/tree/main",
20676
footer: {
207-
text: (
208-
<div className="w-full">
209-
<div className="grid grid-cols-2 md:grid-cols-5 text-base gap-y-8 gap-x-2">
210-
{footerMenu.map((menu) => (
211-
<div key={menu.heading}>
212-
<p className="pb-2 font-mono font-bold text-primary">
213-
{menu.heading}
214-
</p>
215-
<ul className="flex flex-col gap-2">
216-
{menu.items.map((item) => (
217-
<li key={item.name}>
218-
<a
219-
href={item.href}
220-
className="text-sm leading-tight hover:text-primary/80"
221-
>
222-
{item.name}
223-
</a>
224-
</li>
225-
))}
226-
</ul>
227-
</div>
228-
))}
229-
<div />
230-
</div>
231-
<div className="my-8 font-mono text-sm">
232-
© 2022-{new Date().getFullYear()} Finto Technologies
233-
</div>
234-
</div>
235-
),
77+
text: <FooterMenu />,
23678
},
23779
useNextSeoProps() {
23880
const { asPath } = useRouter();

0 commit comments

Comments
 (0)