layout.tsx 816 B

1234567891011121314151617181920
  1. import type { Metadata } from 'next';
  2. import { Geist, Geist_Mono } from 'next/font/google';
  3. import './globals.css';
  4. const sans = Geist({ variable: '--font-geist-sans', subsets: ['latin'] });
  5. const mono = Geist_Mono({ variable: '--font-geist-mono', subsets: ['latin'] });
  6. export const metadata: Metadata = {
  7. title: 'API 服务开发 · Agent 开发补修课',
  8. description:
  9. '面向具有 Python 基础的开发者,用 FastAPI 完成 REST 接口、异步调用、SSE 流式响应与 WebSocket 通信。配套实战步骤、代码与练习。',
  10. icons: { icon: '/favicon.svg' },
  11. };
  12. export default function RootLayout({
  13. children,
  14. }: Readonly<{ children: React.ReactNode }>) {
  15. return (
  16. <html lang="zh-CN">
  17. <body className={`${sans.variable} ${mono.variable}`}>{children}</body>
  18. </html>
  19. );
  20. }