From ba561d1c14a52ab8697c1579a30e61ef928173d1 Mon Sep 17 00:00:00 2001 From: Developer27149 <564151947@qq.com> Date: Thu, 25 Jul 2024 15:29:03 +0800 Subject: [PATCH] fix(seo): support og --- apps/v-next/components/query/index.tsx | 1 - apps/v-next/next.config.mjs | 5 + apps/v-next/public/shandian.svg | 2101 ----------------------- apps/v-next/src/app/action/page.tsx | 2 - apps/v-next/src/app/favicon.ico | Bin 25931 -> 0 bytes apps/v-next/src/app/layout.tsx | 14 +- apps/v-next/src/app/opengraph-image.tsx | 48 + apps/v-next/src/app/page.tsx | 17 +- packages/consts/src/project/index.ts | 3 + 9 files changed, 70 insertions(+), 2121 deletions(-) delete mode 100644 apps/v-next/public/shandian.svg delete mode 100644 apps/v-next/src/app/favicon.ico create mode 100644 apps/v-next/src/app/opengraph-image.tsx diff --git a/apps/v-next/components/query/index.tsx b/apps/v-next/components/query/index.tsx index 7d9ed29..b2a5297 100644 --- a/apps/v-next/components/query/index.tsx +++ b/apps/v-next/components/query/index.tsx @@ -178,7 +178,6 @@ export default function Query({ accessToken }: IQueryProps) { accessToken={accessToken} selectedRows={data.filter((i) => selectedRows.includes(i.id))} onSuccess={() => { - console.log('delete'); setSelectedRows([]); refresh(); }} diff --git a/apps/v-next/next.config.mjs b/apps/v-next/next.config.mjs index ca4ebf5..9466e57 100644 --- a/apps/v-next/next.config.mjs +++ b/apps/v-next/next.config.mjs @@ -6,6 +6,11 @@ const nextConfig = { // github hostname: 'avatars.githubusercontent.com', protocol: 'https' + }, + { + // image bed + hostname: 'de4965e.webp.li', + protocol: 'https' } ] } diff --git a/apps/v-next/public/shandian.svg b/apps/v-next/public/shandian.svg deleted file mode 100644 index 2a2a6d7..0000000 --- a/apps/v-next/public/shandian.svg +++ /dev/null @@ -1,2101 +0,0 @@ - \ No newline at end of file diff --git a/apps/v-next/src/app/action/page.tsx b/apps/v-next/src/app/action/page.tsx index 82f489b..4c5cb7a 100644 --- a/apps/v-next/src/app/action/page.tsx +++ b/apps/v-next/src/app/action/page.tsx @@ -20,8 +20,6 @@ export default async function Page() { }) | null; - console.log('session:', session); - if (session === null) { return (
dAMQaiH zm^r3v#$Q#2T=X>bsY#D%s!bhs^M9PMAcHbCc0FMHV{u-dwlL;a1eJ63v5U*?Q_8JO zT#50!RD619#j_Uf))0ooADz~*9&lN!bBDRUgE>Vud-i5ck%vT=r^yD*^?Mp@Q^v+V zG#-?gKlr}Eeqifb{|So?HM&g91P8|av8hQoCmQXkd?7wIJw b z_^v8bbg` SAn{I*4bH$u(RZ6*x UhuA~hc=8czK8SHEKTzSxgbwi~9(OqJB&gwb^l4+m`k*Q;_?>Y-APi1{k zAHQ)P)G)f|AyjSgcCFps)Fh6Bca*Xznq36!pV6Az&m{O8$wGFD? zY&O*3*J0;_EqM#jh6^gMQKpXV?#1?>$ml1xvh8nSN>-?H=V;nJIwB07YX$e6vLxH( zqYwQ>qxwR(i4f)DLd)-$P>T-no_c!LsN@)8`e;W@)-Hj0>nJ-}Kla4-ZdPJzI&Mce zv)V_j;(3ERN3_@I$N<^|4Lf`B;8n+bX@bHbcZTopEmDI*Jfl)-pFDvo6svPRoo@(x z);_{lY<;);XzT`dBFpRmGrr}z5u1=p C^ S-{ce6iXQlLGcItwJ^mZx{m$&DA_oEZ)B{_bYPq-HA zcH8WGoBG(aBU_j)vEy+_71T34@4dmSg!|M8Vf92Zj6WH7Q7t#OHQqWgFE3ARt+%!T z?oLovLVlnf?2c7pTc)~cc^($_8nyKwsN`RA-23ed3sdj(ys%pjjM+9JrctL;dy8a( z@en&CQmnV(()bu|Y%G1-4a(6x{aLytn$T-;(&{QIJB9vMox11U-1HpD@d(QkaJdEb zG{)+6Dos_L+O3NpWo^=gR?evp|CqEG?L&Ut#D*KLaRFOgOEK(Kq1@!EGcTfo+%A&I z=dLbB+d$u{sh?u)xP{PF8L%;YPPW53+@{>5W=Jt#wQpN;0_HYdw1{ksf_XhO4#2F= zyPx6Lx2<92L-;L5PD`zn6zwIH`Jk( $?Qw({erA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Fk;Kxk!S( O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/apps/v-next/src/app/layout.tsx b/apps/v-next/src/app/layout.tsx index 27f9e9b..5f6eee5 100644 --- a/apps/v-next/src/app/layout.tsx +++ b/apps/v-next/src/app/layout.tsx @@ -28,21 +28,25 @@ export default function RootLayout({ return ( - - - + - + Delete & Archivediff --git a/apps/v-next/src/app/opengraph-image.tsx b/apps/v-next/src/app/opengraph-image.tsx new file mode 100644 index 0000000..887ffaf --- /dev/null +++ b/apps/v-next/src/app/opengraph-image.tsx @@ -0,0 +1,48 @@ +import { PROJECT } from '@shared/consts'; +import { ImageResponse } from 'next/og'; +export const alt = PROJECT.description; +export const size = { width: 1200, height: 630 }; +export const contentType = 'image/png'; + +export default function Image() { + return new ImageResponse( + ( + ++ ), + { + ...size + } + ); +} diff --git a/apps/v-next/src/app/page.tsx b/apps/v-next/src/app/page.tsx index 5023a43..a84142e 100644 --- a/apps/v-next/src/app/page.tsx +++ b/apps/v-next/src/app/page.tsx @@ -1,24 +1,17 @@ import Description from '@@/components/Description'; import SocialMediaShare from '@@/components/SocialMediaShare'; import { PROJECT } from '@shared/consts'; -import Head from 'next/head'; import Image from 'next/image'; import Link from 'next/link'; +export const metadata = { + title: PROJECT.name, + description: PROJECT.description +}; + export default function Home() { return (+ {PROJECT.name} +++ {PROJECT.description} ++- - - - - - - - - - {/* 其他你想要添加的meta标签 */} - {/* Basic Info */} diff --git a/packages/consts/src/project/index.ts b/packages/consts/src/project/index.ts index dc5dee4..a9a54ed 100644 --- a/packages/consts/src/project/index.ts +++ b/packages/consts/src/project/index.ts @@ -25,4 +25,7 @@ export const PROJECT = { }, ], }, + imgs: { + logo: 'https://de4965e.webp.li/blog-images/2024/07/848247cc0d9004068bb1c069f6ef10ee.jpeg', + }, };