|
@@ -52,10 +52,7 @@ const Chapter: NextPageWithLayout<NovelPageProps> = (props) => {
|
|
|
const url = `https://${siteConfig.host}/novel/${query.slug}/${query.chapter}`;
|
|
const url = `https://${siteConfig.host}/novel/${query.slug}/${query.chapter}`;
|
|
|
return {
|
|
return {
|
|
|
title: `${chapterData?.title} - ${chapterData?.chapter} - ${siteConfig.siteName}`,
|
|
title: `${chapterData?.title} - ${chapterData?.chapter} - ${siteConfig.siteName}`,
|
|
|
- // TODO: 作者
|
|
|
|
|
- description: `Read ${chapterData?.title} ${chapterData?.chapter} on ${
|
|
|
|
|
- siteConfig.siteName
|
|
|
|
|
- }. ${chapterData?.title} novel written by ${"作者"}.`,
|
|
|
|
|
|
|
+ description: `Read ${chapterData?.title} ${chapterData?.chapter} on ${siteConfig.siteName}. ${chapterData?.title} novel written by ${detail?.author}.`,
|
|
|
keywords: `${[
|
|
keywords: `${[
|
|
|
chapterData?.title,
|
|
chapterData?.title,
|
|
|
chapterData?.chapter,
|
|
chapterData?.chapter,
|
|
@@ -73,8 +70,7 @@ const Chapter: NextPageWithLayout<NovelPageProps> = (props) => {
|
|
|
? `https://${siteConfig.host}/novel/${chapterData.next}`
|
|
? `https://${siteConfig.host}/novel/${chapterData.next}`
|
|
|
: "",
|
|
: "",
|
|
|
siteName: siteConfig.siteName,
|
|
siteName: siteConfig.siteName,
|
|
|
- // TODO: 图片
|
|
|
|
|
- img: "",
|
|
|
|
|
|
|
+ img: detail?.img,
|
|
|
jsonLd: chapterData
|
|
jsonLd: chapterData
|
|
|
? JSON.stringify([
|
|
? JSON.stringify([
|
|
|
{
|
|
{
|
|
@@ -84,8 +80,7 @@ const Chapter: NextPageWithLayout<NovelPageProps> = (props) => {
|
|
|
headline: `${chapterData?.title || ""} - ${
|
|
headline: `${chapterData?.title || ""} - ${
|
|
|
chapterData?.chapter || ""
|
|
chapterData?.chapter || ""
|
|
|
}`,
|
|
}`,
|
|
|
- // TODO: 更新时间
|
|
|
|
|
- datePublished: "2018-03-16T02:13:00.000Z",
|
|
|
|
|
|
|
+ datePublished: detail?.update_time,
|
|
|
publisher: {
|
|
publisher: {
|
|
|
"@type": "Organization",
|
|
"@type": "Organization",
|
|
|
name: siteConfig.siteName,
|
|
name: siteConfig.siteName,
|
|
@@ -97,8 +92,7 @@ const Chapter: NextPageWithLayout<NovelPageProps> = (props) => {
|
|
|
isAccessibleForFree: true,
|
|
isAccessibleForFree: true,
|
|
|
cssSelector: styles["novel"],
|
|
cssSelector: styles["novel"],
|
|
|
},
|
|
},
|
|
|
- // TODO: 作者
|
|
|
|
|
- author: { "@type": "Person", name: "作者" },
|
|
|
|
|
|
|
+ author: { "@type": "Person", name: detail?.author },
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"@context": "https://schema.org",
|
|
"@context": "https://schema.org",
|
|
@@ -132,6 +126,9 @@ const Chapter: NextPageWithLayout<NovelPageProps> = (props) => {
|
|
|
};
|
|
};
|
|
|
}, [
|
|
}, [
|
|
|
chapterData,
|
|
chapterData,
|
|
|
|
|
+ detail?.author,
|
|
|
|
|
+ detail?.img,
|
|
|
|
|
+ detail?.update_time,
|
|
|
query.chapter,
|
|
query.chapter,
|
|
|
query.slug,
|
|
query.slug,
|
|
|
siteConfig.host,
|
|
siteConfig.host,
|