Refactor some code to make it looks cleaner
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { RSSFeedLink } from "@/consts/consts";
|
||||
import { RSSFeedURL, WebsiteURL } from "@/consts/consts";
|
||||
import { Config } from "@/data/config";
|
||||
import { NextSeo } from "next-seo";
|
||||
|
||||
@@ -6,13 +6,13 @@ export const SEO = (props: { title: string; description?: string | null; coverUR
|
||||
return (
|
||||
<>
|
||||
<title>{props.title}</title>
|
||||
<link rel="alternate" type="application/rss+xml" href={RSSFeedLink} />
|
||||
<link rel="alternate" type="application/rss+xml" href={RSSFeedURL} />
|
||||
<NextSeo
|
||||
title={props.title}
|
||||
description={props.description ?? undefined}
|
||||
description={props.description ?? Config.Sentence}
|
||||
openGraph={{
|
||||
title: props.title,
|
||||
description: props.description ?? undefined,
|
||||
description: props.description ?? Config.Sentence,
|
||||
images: props.coverURL
|
||||
? [
|
||||
{
|
||||
@@ -22,11 +22,18 @@ export const SEO = (props: { title: string; description?: string | null; coverUR
|
||||
alt: props.title,
|
||||
},
|
||||
]
|
||||
: [],
|
||||
: [
|
||||
{
|
||||
url: Config.PageCovers.websiteCoverURL,
|
||||
width: 850,
|
||||
height: 650,
|
||||
alt: props.title,
|
||||
},
|
||||
],
|
||||
}}
|
||||
twitter={{
|
||||
handle: `@${Config.SocialLinks.twitter}`,
|
||||
site: Config.SiteDomain,
|
||||
site: WebsiteURL,
|
||||
cardType: "summary_large_image",
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user