From 4077f2e5815a4b57ebe69476fb002fc3a45a7cd8 Mon Sep 17 00:00:00 2001 From: PrinOrange Date: Mon, 12 Aug 2024 11:09:58 +0800 Subject: [PATCH] [Fix] Enhance the SEO effect for twitter card. --- components/utils/SEO.tsx | 54 ++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/components/utils/SEO.tsx b/components/utils/SEO.tsx index 09a902e..96bb27b 100644 --- a/components/utils/SEO.tsx +++ b/components/utils/SEO.tsx @@ -1,42 +1,26 @@ -import { RSSFeedURL, WebsiteURL } from "@/consts/consts"; +import { RSSFeedURL } from "@/consts/consts"; import { Config } from "@/data/config"; -import { NextSeo } from "next-seo"; +import Head from "next/head"; -export const SEO = (props: { title: string; description?: string | null; coverURL?: string | null }) => { +type TSEOProps = { title: string; description?: string | null; coverURL?: string | null; smallTwitterCard?: boolean }; + +export const SEO = (props: TSEOProps) => { return ( - <> + {props.title} - - + + + + + + + + + + + + + ); };