refactor: 优化控制台、博客、资源语义化
This commit is contained in:
@@ -24,6 +24,12 @@ const getBlogDetailUrl = (id: string): string => {
|
||||
return `/blog/${encoded}`;
|
||||
};
|
||||
|
||||
|
||||
export const metadata = {
|
||||
title: '日志 - 特恩的日志',
|
||||
description: '我随便发点,你也随便看看~',
|
||||
};
|
||||
|
||||
export default async function Blog() {
|
||||
let errorMsg = '';
|
||||
const blogs = await BlogAPI.list().catch(e => {
|
||||
|
||||
@@ -7,6 +7,11 @@ import {
|
||||
import { ResourceAPI } from "@/lib/api/server";
|
||||
import { AlertCircle } from "lucide-react";
|
||||
|
||||
export const metadata = {
|
||||
title: '资源 - 特恩的日志',
|
||||
description: '一些实用工具和学习资源',
|
||||
};
|
||||
|
||||
export default async function Resources() {
|
||||
let errorMsg = '';
|
||||
const data = await ResourceAPI.list().catch(e => { errorMsg = `${e}`; return null; });
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "../components/theme-provider";
|
||||
import { metadata } from "./config/metadata";
|
||||
import { Toaster } from "sonner";
|
||||
import { UserAPI } from "@/lib/api/server";
|
||||
import { ClientProvider } from "./ClientProvider";
|
||||
import { Metadata } from "next";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
@@ -16,7 +16,10 @@ const geistMono = Geist_Mono({
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export { metadata };
|
||||
export const metadata: Metadata = {
|
||||
title: "控制台 - 特恩的日志",
|
||||
description: "登录或注册以解锁更多妙妙小工具",
|
||||
};
|
||||
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
|
||||
Reference in New Issue
Block a user