@quintype/seo 1.40.12-upgrade-R18.0 → 1.40.12

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,13 @@
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.12](https://github.com/quintype/quintype-node-seo/compare/v1.40.11...v1.40.12) (2022-10-19)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **discover-meta:** Add max image meta tag to story pages ([e96fa17](https://github.com/quintype/quintype-node-seo/commit/e96fa17637e2a625aa39601d2ace8ad2ea46d786))
11
+
5
12
  ### [1.40.11](https://github.com/quintype/quintype-node-seo/compare/v1.40.8...v1.40.11) (2022-09-06)
6
13
 
7
14
 
package/dist/index.cjs.js CHANGED
@@ -300,6 +300,10 @@ function ImageTags(seoConfig, config, pageType, data, { url = {} }) {
300
300
 
301
301
  const tags = [];
302
302
 
303
+ if (pageType == "story-page") {
304
+ tags.push({ name: "robots", content: "max-image-preview:large" });
305
+ }
306
+
303
307
  if (seoConfig.enableTwitterCards) {
304
308
  tags.push({
305
309
  name: "twitter:image",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/seo",
3
- "version": "1.40.12-upgrade-R18.0",
3
+ "version": "1.40.12",
4
4
  "description": "SEO Modules for Quintype",
5
5
  "main": "dist/index.cjs.js",
6
6
  "repository": "https://github.com/quintype/quintype-node-seo",
@@ -8,8 +8,8 @@
8
8
  "license": "MIT",
9
9
  "peerDependencies": {
10
10
  "lodash": "^4.0.0",
11
- "react": "^18.2.0",
12
- "react-dom": "^18.2.0"
11
+ "react": "^16.0.0",
12
+ "react-dom": "^16.0.0"
13
13
  },
14
14
  "scripts": {
15
15
  "build": "rollup -c",
@@ -44,8 +44,8 @@
44
44
  "nyc": "^15.0.0",
45
45
  "onchange": "^7.0.2",
46
46
  "prettier": "^2.2.1",
47
- "react": "^18.2.0",
48
- "react-dom": "^18.2.0",
47
+ "react": "^17.0.1",
48
+ "react-dom": "^17.0.1",
49
49
  "rimraf": "^3.0.2",
50
50
  "rollup": "^2.0.0",
51
51
  "rollup-plugin-babel": "^3.0.2",
package/src/image-tags.js CHANGED
@@ -119,6 +119,10 @@ export function ImageTags(seoConfig, config, pageType, data, { url = {} }) {
119
119
 
120
120
  const tags = [];
121
121
 
122
+ if (pageType == "story-page") {
123
+ tags.push({ name: "robots", content: "max-image-preview:large" });
124
+ }
125
+
122
126
  if (seoConfig.enableTwitterCards) {
123
127
  tags.push({
124
128
  name: "twitter:image",
@@ -48,6 +48,33 @@ describe("ImageTags", function () {
48
48
  );
49
49
  });
50
50
 
51
+ it("adds image max size tag for story page", function () {
52
+ const story = {
53
+ "hero-image-s3-key": "my/image.png",
54
+ alternative: {
55
+ social: {
56
+ default: {
57
+ headline: null,
58
+ "hero-image": {
59
+ "hero-image-s3-key": "my/socialimage.png",
60
+ },
61
+ },
62
+ },
63
+ home: {
64
+ default: {
65
+ headline: null,
66
+ "hero-image": {
67
+ "hero-image-s3-key": "my/homeimage.png",
68
+ },
69
+ },
70
+ },
71
+ },
72
+ };
73
+ const string = getSeoMetadata(seoConfig, config, "story-page", { data: { story: story } }, {});
74
+ const ampPageString = getSeoMetadata(seoConfig, config, "story-page-amp", { data: { story: story } }, {});
75
+ assertContains('<meta name="robots" content="max-image-preview:large"/>', string);
76
+ });
77
+
51
78
  it("has facebook tags resized correctly", function () {
52
79
  const story = {
53
80
  "hero-image-s3-key": "my/images.png",