update previous examples & add Tanstack Start i18n example

This commit is contained in:
Fuma Nama
2025-08-19 17:23:24 +08:00
parent 50eb07f51d
commit a217bdfe00
50 changed files with 691 additions and 142 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import type { ReactNode } from 'react';
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { baseOptions } from '@/app/layout.config';
import { baseOptions } from '@/lib/layout.shared';
export default function Layout({ children }: { children: ReactNode }) {
return <HomeLayout {...baseOptions}>{children}</HomeLayout>;
return <HomeLayout {...baseOptions()}>{children}</HomeLayout>;
}
+2 -2
View File
@@ -1,11 +1,11 @@
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import type { ReactNode } from 'react';
import { baseOptions } from '@/app/layout.config';
import { baseOptions } from '@/lib/layout.shared';
import { source } from '@/lib/source';
export default function Layout({ children }: { children: ReactNode }) {
return (
<DocsLayout tree={source.pageTree} {...baseOptions}>
<DocsLayout tree={source.pageTree} {...baseOptions()}>
{children}
</DocsLayout>
);
-21
View File
@@ -1,21 +0,0 @@
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
/**
* Shared layout configurations
*
* you can customise layouts individually from:
* Home Layout: app/(home)/layout.tsx
* Docs Layout: app/docs/layout.tsx
*/
export const baseOptions: BaseLayoutProps = {
nav: {
title: 'Python Docs',
},
links: [
{
text: 'Documentation',
url: '/docs',
active: 'nested-url',
},
],
};
+16
View File
@@ -0,0 +1,16 @@
import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
export function baseOptions(): BaseLayoutProps {
return {
nav: {
title: 'Python Docs',
},
links: [
{
text: 'Documentation',
url: '/docs',
active: 'nested-url',
},
],
};
}