@yimingliao/cms 0.0.242 → 0.0.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@ import { sanitizeStringArray } from './utils/sanitize-string-array.js';
|
|
|
7
7
|
import { toIsoTime } from './utils/to-iso-time.js';
|
|
8
8
|
import { toOgLocale } from './utils/to-og-locale.js';
|
|
9
9
|
|
|
10
|
-
function createBuildArticleMetadata(siteConfig, storageUrl
|
|
10
|
+
function createBuildArticleMetadata(siteConfig, storageUrl) {
|
|
11
11
|
return function buildArticleMetadata(urls, post, locale) {
|
|
12
12
|
const { defaultLocale, locales, site } = siteConfig;
|
|
13
13
|
const resolvedLocale = locale || defaultLocale;
|
|
@@ -25,7 +25,7 @@ function createBuildArticleMetadata(siteConfig, storageUrl, author) {
|
|
|
25
25
|
title: seoMetadata.title || site.name[resolvedLocale],
|
|
26
26
|
description: seoMetadata.description || site.description[resolvedLocale],
|
|
27
27
|
// identity
|
|
28
|
-
authors:
|
|
28
|
+
authors: [
|
|
29
29
|
{
|
|
30
30
|
name: seoMetadata.author || authorT.authorName || void 0,
|
|
31
31
|
url: authorT.url || void 0
|
|
@@ -70,7 +70,7 @@ function createBuildArticleMetadata(siteConfig, storageUrl, author) {
|
|
|
70
70
|
// article
|
|
71
71
|
publishedTime: toIsoTime(seoMetadata.ogArticlePublishedTime),
|
|
72
72
|
modifiedTime: toIsoTime(seoMetadata.ogArticleModifiedTime),
|
|
73
|
-
authors:
|
|
73
|
+
authors: [seoMetadata.ogArticleAuthor || authorT.authorName].filter(
|
|
74
74
|
Boolean
|
|
75
75
|
),
|
|
76
76
|
section: seoMetadata.ogArticleSection,
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import type { SiteConfig } from "../../domain";
|
|
2
2
|
import type { PostFull } from "../../domain/resources/post/full";
|
|
3
3
|
import type { Metadata } from "next";
|
|
4
|
-
export declare function createBuildArticleMetadata<Locale extends string = string>(siteConfig: SiteConfig<Locale>, storageUrl: string
|
|
5
|
-
name: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
}): (urls: {
|
|
4
|
+
export declare function createBuildArticleMetadata<Locale extends string = string>(siteConfig: SiteConfig<Locale>, storageUrl: string): (urls: {
|
|
8
5
|
canonical: string;
|
|
9
6
|
alternates: Record<string, string>;
|
|
10
7
|
}, post?: PostFull, locale?: Locale) => Metadata;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-article-metadata.d.ts","sourceRoot":"","sources":["../../../../../src/shared/seo-metadata/build-article-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAUrC,wBAAgB,0BAA0B,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,EACvE,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,EAC9B,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"build-article-metadata.d.ts","sourceRoot":"","sources":["../../../../../src/shared/seo-metadata/build-article-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAUrC,wBAAgB,0BAA0B,CAAC,MAAM,SAAS,MAAM,GAAG,MAAM,EACvE,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,EAC9B,UAAU,EAAE,MAAM,IAGhB,MAAM;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EAC/D,OAAO,QAAQ,EACf,SAAS,MAAM,KACd,QAAQ,CAkGZ"}
|