@quintype/seo 1.46.1-support-image-alt-text.0 → 1.46.2
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.
- package/CHANGELOG.md +4 -0
- package/dist/index.cjs.js +22 -0
- package/index.js +4 -4
- package/package.json +1 -1
- package/src/structured-data/schema.js +19 -0
- package/src/structured-data/structured-data-tags.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.46.2](https://github.com/quintype/quintype-node-seo/compare/v1.46.1...v1.46.2) (2024-06-12)
|
|
6
|
+
|
|
7
|
+
### [1.46.1](https://github.com/quintype/quintype-node-seo/compare/v1.46.0...v1.46.1) (2024-06-11)
|
|
8
|
+
|
|
5
9
|
## [1.46.0](https://github.com/quintype/quintype-node-seo/compare/v1.44.1...v1.46.0) (2024-04-18)
|
|
6
10
|
|
|
7
11
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -535,6 +535,24 @@ function getSchemaBreadcrumbList(breadcrumbsDataList) {
|
|
|
535
535
|
return Object.assign({}, getSchemaContext, getSchemaType("BreadcrumbList"), { itemListElement });
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
function generateAuthorPageSchema(publisherConfig, data, url) {
|
|
539
|
+
const sketchesHost = publisherConfig["sketches-host"];
|
|
540
|
+
const publisherName = getTitle$1(publisherConfig);
|
|
541
|
+
const authorHREF = url["href"];
|
|
542
|
+
const authorURL = `${sketchesHost}${authorHREF}`;
|
|
543
|
+
const authorName = lodash.get(data, ["author", "name"], "");
|
|
544
|
+
return {
|
|
545
|
+
name: authorName,
|
|
546
|
+
jobTitle: "Author",
|
|
547
|
+
url: authorURL,
|
|
548
|
+
worksFor: {
|
|
549
|
+
"@type": "NewsMediaOrganization",
|
|
550
|
+
name: publisherName,
|
|
551
|
+
url: sketchesHost
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
|
|
538
556
|
function getMovieEntityTags(movieJson) {
|
|
539
557
|
return getSchemaMovieReview(movieJson);
|
|
540
558
|
}
|
|
@@ -961,6 +979,10 @@ function StructuredDataTags({ structuredData = {} }, config, pageType, response
|
|
|
961
979
|
}
|
|
962
980
|
}
|
|
963
981
|
|
|
982
|
+
if (!isStructuredDataEmpty && pageType === "author-page") {
|
|
983
|
+
tags.push(ldJson("Person", generateAuthorPageSchema(publisherConfig, response.data, url)));
|
|
984
|
+
}
|
|
985
|
+
|
|
964
986
|
function generateNewsArticleTags() {
|
|
965
987
|
if (structuredData.enableNewsArticle) {
|
|
966
988
|
return ldJson("NewsArticle", Object.assign({}, articleData, generateNewsArticleData(structuredData, story, publisherConfig, pageType)));
|
package/index.js
CHANGED
|
@@ -7,15 +7,15 @@ import { generateStaticData, generateStructuredData } from "./src/generate-commo
|
|
|
7
7
|
import { ImageTags } from "./src/image-tags.js";
|
|
8
8
|
import { StaticTags } from "./src/static-tags.js";
|
|
9
9
|
import { StructuredDataTags } from "./src/structured-data/structured-data-tags.js";
|
|
10
|
-
import {
|
|
10
|
+
import { TextTags, getTitle } from "./src/text-tags.js";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
|
-
TextTags,
|
|
14
|
-
StaticTags,
|
|
15
13
|
AuthorTags,
|
|
16
14
|
ImageTags,
|
|
17
|
-
|
|
15
|
+
StaticTags,
|
|
18
16
|
StoryAmpTags,
|
|
17
|
+
StructuredDataTags,
|
|
18
|
+
TextTags,
|
|
19
19
|
generateStaticData,
|
|
20
20
|
generateStructuredData,
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { get } from "lodash";
|
|
2
|
+
import { getTitle } from "../generate-common-seo";
|
|
2
3
|
import { stripMillisecondsFromTime } from "../utils";
|
|
3
4
|
export const getSchemaContext = { "@context": "http://schema.org" };
|
|
4
5
|
|
|
@@ -132,3 +133,21 @@ export function getSchemaBreadcrumbList(breadcrumbsDataList) {
|
|
|
132
133
|
);
|
|
133
134
|
return Object.assign({}, getSchemaContext, getSchemaType("BreadcrumbList"), { itemListElement });
|
|
134
135
|
}
|
|
136
|
+
|
|
137
|
+
export function generateAuthorPageSchema(publisherConfig, data, url) {
|
|
138
|
+
const sketchesHost = publisherConfig["sketches-host"];
|
|
139
|
+
const publisherName = getTitle(publisherConfig);
|
|
140
|
+
const authorHREF = url["href"];
|
|
141
|
+
const authorURL = `${sketchesHost}${authorHREF}`;
|
|
142
|
+
const authorName = get(data, ["author", "name"], "");
|
|
143
|
+
return {
|
|
144
|
+
name: authorName,
|
|
145
|
+
jobTitle: "Author",
|
|
146
|
+
url: authorURL,
|
|
147
|
+
worksFor: {
|
|
148
|
+
"@type": "NewsMediaOrganization",
|
|
149
|
+
name: publisherName,
|
|
150
|
+
url: sketchesHost,
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
}
|
|
@@ -2,6 +2,7 @@ import get from "lodash/get";
|
|
|
2
2
|
import { getQueryParams, stripMillisecondsFromTime } from "../utils";
|
|
3
3
|
import { generateTagsForEntity } from "./entity";
|
|
4
4
|
import {
|
|
5
|
+
generateAuthorPageSchema,
|
|
5
6
|
getSchemaBlogPosting,
|
|
6
7
|
getSchemaBreadcrumbList,
|
|
7
8
|
getSchemaContext,
|
|
@@ -486,6 +487,10 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re
|
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
489
|
|
|
490
|
+
if (!isStructuredDataEmpty && pageType === "author-page") {
|
|
491
|
+
tags.push(ldJson("Person", generateAuthorPageSchema(publisherConfig, response.data, url)));
|
|
492
|
+
}
|
|
493
|
+
|
|
489
494
|
function generateNewsArticleTags() {
|
|
490
495
|
if (structuredData.enableNewsArticle) {
|
|
491
496
|
return ldJson(
|