@quintype/seo 1.40.13-metadata-404.0 → 1.40.13

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 CHANGED
@@ -2,6 +2,8 @@
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.40.13](https://github.com/quintype/quintype-node-seo/compare/v1.40.12...v1.40.13) (2022-10-27)
6
+
5
7
  ### [1.40.12](https://github.com/quintype/quintype-node-seo/compare/v1.40.11...v1.40.12) (2022-10-19)
6
8
 
7
9
 
package/dist/index.cjs.js CHANGED
@@ -478,7 +478,7 @@ function imageUrl(publisherConfig, s3Key, width, height) {
478
478
  const imageSrc = /^https?.*/.test(publisherConfig["cdn-image"]) ? publisherConfig["cdn-image"] : `https://${publisherConfig["cdn-image"]}`;
479
479
  width = width || "";
480
480
  height = height || "";
481
- return `${imageSrc}/${s3Key}?w=${width}&h=${height}&auto=format%2Ccompress&fit=max`;
481
+ return `${imageSrc}/${s3Key}?w=${width}&h=${height}&auto=format%2Ccompress&fit=max&enlarge=true`;
482
482
  }
483
483
 
484
484
  function generateCommonData(structuredData = {}, story = {}, publisherConfig = {}, timezone) {
@@ -982,33 +982,6 @@ function buildTagsFromTopic(config, tag, url = {}, data) {
982
982
  return topicMetaData;
983
983
  }
984
984
 
985
- function buildTagsFromNotfoundPage(config, url = {}, data) {
986
- const homeSeoData = config["seo-metadata"].find(page => page["owner-type"] === "home") || {
987
- data: { description: "" }
988
- };
989
- const customSeo = lodash.get(data, ["data", "customSeo"], {});
990
- const title = customSeo.title || "404 - Page not found ";
991
- const pageTitle = customSeo["page-title"] || title;
992
- const description = customSeo.description || homeSeoData.data.description || "404 - Page not found";
993
- const tagUrl = `${config["sketches-host"]}${url.pathname}`;
994
- const canonicalSlug = tag["canonical-slug"] || url.pathname;
995
- const canonicalUrl = `${config["sketches-host"]}${canonicalSlug}`;
996
- const ogTitle = customSeo.ogTitle || title;
997
- const ogDescription = customSeo.ogDescription || description;
998
- const topicMetaData = {
999
- title: title,
1000
- "page-title": pageTitle,
1001
- description: description,
1002
- keywords: title,
1003
- canonicalUrl,
1004
- ogUrl: tagUrl,
1005
- ogTitle,
1006
- ogDescription
1007
- };
1008
-
1009
- return topicMetaData;
1010
- }
1011
-
1012
985
  function buildTagsFromAuthor(config, author, url = {}, data) {
1013
986
  if (lodash.isEmpty(author)) return;
1014
987
 
@@ -1125,8 +1098,6 @@ function getSeoData(config, pageType, data, url = {}, seoConfig = {}) {
1125
1098
  return buildTagsFromAuthor(config, lodash.get(data, ["data", "author"], {}), url, data) || getSeoData(config, "home-page", data, url);
1126
1099
  case "static-page":
1127
1100
  return buildTagsFromStaticPage(config, lodash.get(data, ["data", "page"], {}), url, data) || getSeoData(config, "home-page", data, url);
1128
- case "not-found":
1129
- return buildTagsFromNotfoundPage(config, url, data) || getSeoData(config, "home-page", data, url);
1130
1101
  case "shell":
1131
1102
  return getShellSeoData(config);
1132
1103
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/seo",
3
- "version": "1.40.13-metadata-404.0",
3
+ "version": "1.40.13",
4
4
  "description": "SEO Modules for Quintype",
5
5
  "main": "dist/index.cjs.js",
6
6
  "repository": "https://github.com/quintype/quintype-node-seo",
@@ -34,7 +34,7 @@ function imageUrl(publisherConfig, s3Key, width, height) {
34
34
  : `https://${publisherConfig["cdn-image"]}`;
35
35
  width = width || "";
36
36
  height = height || "";
37
- return `${imageSrc}/${s3Key}?w=${width}&h=${height}&auto=format%2Ccompress&fit=max`;
37
+ return `${imageSrc}/${s3Key}?w=${width}&h=${height}&auto=format%2Ccompress&fit=max&enlarge=true`;
38
38
  }
39
39
 
40
40
  function generateCommonData(structuredData = {}, story = {}, publisherConfig = {}, timezone) {
package/src/text-tags.js CHANGED
@@ -81,33 +81,6 @@ function buildTagsFromTopic(config, tag, url = {}, data) {
81
81
  return topicMetaData;
82
82
  }
83
83
 
84
- function buildTagsFromNotfoundPage(config, url = {}, data) {
85
- const homeSeoData = config["seo-metadata"].find((page) => page["owner-type"] === "home") || {
86
- data: { description: "" },
87
- };
88
- const customSeo = get(data, ["data", "customSeo"], {});
89
- const title = customSeo.title || "404 - Page not found ";
90
- const pageTitle = customSeo["page-title"] || title;
91
- const description = customSeo.description || homeSeoData.data.description || "404 - Page not found";
92
- const tagUrl = `${config["sketches-host"]}${url.pathname}`;
93
- const canonicalSlug = tag["canonical-slug"] || url.pathname;
94
- const canonicalUrl = `${config["sketches-host"]}${canonicalSlug}`;
95
- const ogTitle = customSeo.ogTitle || title;
96
- const ogDescription = customSeo.ogDescription || description;
97
- const topicMetaData = {
98
- title: title,
99
- "page-title": pageTitle,
100
- description: description,
101
- keywords: title,
102
- canonicalUrl,
103
- ogUrl: tagUrl,
104
- ogTitle,
105
- ogDescription,
106
- };
107
-
108
- return topicMetaData;
109
- }
110
-
111
84
  function buildTagsFromAuthor(config, author, url = {}, data) {
112
85
  if (isEmpty(author)) return;
113
86
 
@@ -247,8 +220,6 @@ function getSeoData(config, pageType, data, url = {}, seoConfig = {}) {
247
220
  buildTagsFromStaticPage(config, get(data, ["data", "page"], {}), url, data) ||
248
221
  getSeoData(config, "home-page", data, url)
249
222
  );
250
- case "not-found":
251
- return buildTagsFromNotfoundPage(config, url, data) || getSeoData(config, "home-page", data, url);
252
223
  case "shell":
253
224
  return getShellSeoData(config);
254
225
  default: