@mindful-web/marko-web 1.92.1 → 1.93.0
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/components/bot-scores.marko.js +2 -2
- package/components/browser-component/script.marko.js +2 -2
- package/components/browser-component.marko.js +2 -2
- package/components/deferred-stylesheet.marko.js +2 -2
- package/components/document/components/body-wrapper.marko.js +2 -2
- package/components/document/components/error.marko.js +2 -2
- package/components/document/components/live-reload.marko.js +2 -2
- package/components/document/components/polyfill.marko.js +2 -2
- package/components/document/components/styles.marko.js +2 -2
- package/components/document/container.marko.js +2 -2
- package/components/document/index.marko.js +2 -2
- package/components/element/array.marko.js +2 -2
- package/components/element/audio.marko.js +2 -2
- package/components/element/block.marko.js +2 -2
- package/components/element/clear.marko.js +2 -2
- package/components/element/components/image.marko.js +2 -2
- package/components/element/components/text.marko.js +2 -2
- package/components/element/content/address1.marko.js +2 -2
- package/components/element/content/address2.marko.js +2 -2
- package/components/element/content/audio.marko.js +2 -2
- package/components/element/content/authors.marko.js +2 -2
- package/components/element/content/body.marko.js +2 -2
- package/components/element/content/byline.marko.js +2 -2
- package/components/element/content/city-state-zip.marko.js +2 -2
- package/components/element/content/contributors.marko.js +2 -2
- package/components/element/content/country.marko.js +2 -2
- package/components/element/content/embed-code.marko.js +2 -2
- package/components/element/content/end-date.marko.js +2 -2
- package/components/element/content/ends.marko.js +2 -2
- package/components/element/content/fax.marko.js +2 -2
- package/components/element/content/images.marko.js +2 -2
- package/components/element/content/mobile.marko.js +2 -2
- package/components/element/content/name.marko.js +2 -2
- package/components/element/content/phone.marko.js +2 -2
- package/components/element/content/photographers.marko.js +2 -2
- package/components/element/content/public-email.marko.js +2 -2
- package/components/element/content/published.marko.js +2 -2
- package/components/element/content/short-name.marko.js +2 -2
- package/components/element/content/sidebar-stubs.marko.js +2 -2
- package/components/element/content/sidebars.marko.js +2 -2
- package/components/element/content/source.marko.js +2 -2
- package/components/element/content/speakers.marko.js +2 -2
- package/components/element/content/sponsors.marko.js +2 -2
- package/components/element/content/start-date.marko.js +2 -2
- package/components/element/content/starts.marko.js +2 -2
- package/components/element/content/teaser.marko.js +2 -2
- package/components/element/content/title.marko.js +2 -2
- package/components/element/content/tollfree.marko.js +2 -2
- package/components/element/content/transcript.marko.js +2 -2
- package/components/element/content/website-deck.marko.js +2 -2
- package/components/element/content/website.marko.js +2 -2
- package/components/element/date.marko.js +2 -2
- package/components/element/image/caption.marko.js +2 -2
- package/components/element/image/credit.marko.js +2 -2
- package/components/element/image/display-name.marko.js +2 -2
- package/components/element/image/slider.marko.js +2 -2
- package/components/element/img.marko.js +2 -2
- package/components/element/index.marko.js +2 -2
- package/components/element/link.marko.js +2 -2
- package/components/element/magazine-issue/description.marko.js +2 -2
- package/components/element/magazine-issue/digital-edition-url.marko.js +2 -2
- package/components/element/magazine-issue/name.marko.js +2 -2
- package/components/element/magazine-issue/pdf-url.marko.js +2 -2
- package/components/element/magazine-publication/cancel-url.marko.js +2 -2
- package/components/element/magazine-publication/change-address-url.marko.js +2 -2
- package/components/element/magazine-publication/description.marko.js +2 -2
- package/components/element/magazine-publication/einquiry-url.marko.js +2 -2
- package/components/element/magazine-publication/name.marko.js +2 -2
- package/components/element/magazine-publication/renewal-url.marko.js +2 -2
- package/components/element/magazine-publication/reprints-url.marko.js +2 -2
- package/components/element/magazine-publication/subscribe-url.marko.js +2 -2
- package/components/element/obj-array.marko.js +2 -2
- package/components/element/obj-audio.marko.js +2 -2
- package/components/element/obj-date.marko.js +2 -2
- package/components/element/obj-nodes.marko.js +2 -2
- package/components/element/obj-text.marko.js +2 -2
- package/components/element/obj.marko.js +2 -2
- package/components/element/picture.marko.js +2 -2
- package/components/element/text.marko.js +2 -2
- package/components/element/website-section/description.marko.js +2 -2
- package/components/element/website-section/hierarchy.marko.js +2 -2
- package/components/element/website-section/name.marko.js +2 -2
- package/components/font/google.marko.js +2 -2
- package/components/font/link.marko.js +2 -2
- package/components/font/typekit.marko.js +2 -2
- package/components/load-more/index.marko.js +2 -2
- package/components/load-more/trigger.marko.js +2 -2
- package/components/node/body.marko.js +2 -2
- package/components/node/element.marko.js +2 -2
- package/components/node/footer.marko.js +2 -2
- package/components/node/header.marko.js +2 -2
- package/components/node/image-inner-wrapper.marko.js +2 -2
- package/components/node/image-wrapper.marko.js +2 -2
- package/components/node/image.marko.js +2 -2
- package/components/node/index.marko.js +2 -2
- package/components/node-list/body.marko.js +2 -2
- package/components/node-list/element.marko.js +2 -2
- package/components/node-list/footer.marko.js +2 -2
- package/components/node-list/header.marko.js +2 -2
- package/components/node-list/index.marko.js +2 -2
- package/components/node-list/node.marko.js +2 -2
- package/components/node-list/nodes.marko.js +2 -2
- package/components/page/container.marko.js +2 -2
- package/components/page/description.marko.js +2 -2
- package/components/page/image.marko.js +2 -2
- package/components/page/layouts/content.marko.js +2 -2
- package/components/page/layouts/default.marko.js +2 -2
- package/components/page/layouts/dynamic-page.marko.js +2 -2
- package/components/page/layouts/magazine-issue.marko.js +2 -2
- package/components/page/layouts/magazine-publication.marko.js +2 -2
- package/components/page/layouts/website-section.marko.js +2 -2
- package/components/page/metadata/components/common.marko.js +2 -2
- package/components/page/metadata/content.marko +65 -17
- package/components/page/metadata/content.marko.js +45 -15
- package/components/page/metadata/default.marko.js +2 -2
- package/components/page/metadata/dynamic-page.marko.js +2 -2
- package/components/page/metadata/magazine-issue.marko.js +2 -2
- package/components/page/metadata/magazine-publication.marko.js +2 -2
- package/components/page/metadata/website-section.marko.js +2 -2
- package/components/page/rel-canonical.marko.js +2 -2
- package/components/page/title.marko.js +2 -2
- package/components/page/wrapper.marko.js +2 -2
- package/components/resolve/page.marko.js +2 -2
- package/components/rss/website-section.marko.js +2 -2
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/node-list/node.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
8
|
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
@@ -42,7 +42,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
marko_template.meta = {
|
|
45
|
-
id: "/@mindful-web/marko-web$1.
|
|
45
|
+
id: "/@mindful-web/marko-web$1.93.0/components/node-list/node.marko",
|
|
46
46
|
tags: [
|
|
47
47
|
"./element.marko"
|
|
48
48
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/node-list/nodes.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
8
|
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
@@ -118,7 +118,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
marko_template.meta = {
|
|
121
|
-
id: "/@mindful-web/marko-web$1.
|
|
121
|
+
id: "/@mindful-web/marko-web$1.93.0/components/node-list/nodes.marko",
|
|
122
122
|
tags: [
|
|
123
123
|
"./node.marko",
|
|
124
124
|
"./element.marko"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/container.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
8
|
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
marko_template.meta = {
|
|
45
|
-
id: "/@mindful-web/marko-web$1.
|
|
45
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/container.marko"
|
|
46
46
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/description.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
|
8
8
|
|
|
@@ -22,5 +22,5 @@ marko_template._ = marko_renderer(render, {
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
marko_template.meta = {
|
|
25
|
-
id: "/@mindful-web/marko-web$1.
|
|
25
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/description.marko"
|
|
26
26
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/image.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_image_module = require("@mindful-web/image"),
|
|
8
8
|
image_module = module_image_module.default || module_image_module,
|
|
@@ -111,7 +111,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
marko_template.meta = {
|
|
114
|
-
id: "/@mindful-web/marko-web$1.
|
|
114
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/image.marko",
|
|
115
115
|
tags: [
|
|
116
116
|
"../element/image/display-name.marko",
|
|
117
117
|
"../element/img.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/layouts/content.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_web_content_page_metadata_template = require("../metadata/content.marko"),
|
|
8
8
|
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
@@ -57,7 +57,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
marko_template.meta = {
|
|
60
|
-
id: "/@mindful-web/marko-web$1.
|
|
60
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/layouts/content.marko",
|
|
61
61
|
tags: [
|
|
62
62
|
"../metadata/content.marko"
|
|
63
63
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/layouts/default.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_web_default_page_metadata_template = require("../metadata/default.marko"),
|
|
8
8
|
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
@@ -57,7 +57,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
marko_template.meta = {
|
|
60
|
-
id: "/@mindful-web/marko-web$1.
|
|
60
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/layouts/default.marko",
|
|
61
61
|
tags: [
|
|
62
62
|
"../metadata/default.marko"
|
|
63
63
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/layouts/dynamic-page.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_web_dynamic_page_metadata_template = require("../metadata/dynamic-page.marko"),
|
|
8
8
|
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
marko_template.meta = {
|
|
56
|
-
id: "/@mindful-web/marko-web$1.
|
|
56
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/layouts/dynamic-page.marko",
|
|
57
57
|
tags: [
|
|
58
58
|
"../metadata/dynamic-page.marko"
|
|
59
59
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/layouts/magazine-issue.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_web_magazine_issue_page_metadata_template = require("../metadata/magazine-issue.marko"),
|
|
8
8
|
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
marko_template.meta = {
|
|
56
|
-
id: "/@mindful-web/marko-web$1.
|
|
56
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/layouts/magazine-issue.marko",
|
|
57
57
|
tags: [
|
|
58
58
|
"../metadata/magazine-issue.marko"
|
|
59
59
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/layouts/magazine-publication.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
marko_web_magazine_publication_page_metadata_template = require("../metadata/magazine-publication.marko"),
|
|
8
8
|
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
@@ -53,7 +53,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
marko_template.meta = {
|
|
56
|
-
id: "/@mindful-web/marko-web$1.
|
|
56
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/layouts/magazine-publication.marko",
|
|
57
57
|
tags: [
|
|
58
58
|
"../metadata/magazine-publication.marko"
|
|
59
59
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/layouts/website-section.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
8
|
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
@@ -71,7 +71,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
marko_template.meta = {
|
|
74
|
-
id: "/@mindful-web/marko-web$1.
|
|
74
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/layouts/website-section.marko",
|
|
75
75
|
tags: [
|
|
76
76
|
"../metadata/website-section.marko",
|
|
77
77
|
"../../rss/website-section.marko"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/components/common.marko",
|
|
6
6
|
marko_component = require("./common.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
marko_web_page_title_template = require("../../title.marko"),
|
|
@@ -112,7 +112,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
112
112
|
}, marko_component);
|
|
113
113
|
|
|
114
114
|
marko_template.meta = {
|
|
115
|
-
id: "/@mindful-web/marko-web$1.
|
|
115
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/components/common.marko",
|
|
116
116
|
component: "./common.marko",
|
|
117
117
|
tags: [
|
|
118
118
|
"../../title.marko",
|
|
@@ -6,6 +6,31 @@ import defaultBuildStructuredData from "../../../utils/build-geo-structured-data
|
|
|
6
6
|
|
|
7
7
|
<!-- @todo This data should generated and saved to the content object as flat data, so no relationships are required. -->
|
|
8
8
|
|
|
9
|
+
<!--
|
|
10
|
+
Metadata image target: 1200x675, the 16:9 ratio at the 1200px width Google recommends. Every
|
|
11
|
+
src below pins `w`, `h` and a filling `fit`, so an asset is served at exactly these dimensions
|
|
12
|
+
whatever its own shape -- which is the whole point. Requesting `w`/`h` _without_ a fit lets
|
|
13
|
+
imgix apply its `fit=clip` default, which fits the image inside the box instead of filling it
|
|
14
|
+
and returns something narrower than 1200 for anything but a 16:9 source. These are also the
|
|
15
|
+
emitted og:image:width/height, so keep them as the single source for the dimensions and the
|
|
16
|
+
tags cannot drift from the bytes.
|
|
17
|
+
|
|
18
|
+
The og:image and the JSON-LD image are separate channels serving different consumers, and they
|
|
19
|
+
share these values only because both currently target 16:9 -- see each query below for why.
|
|
20
|
+
Split them if one channel's target ever diverges (Facebook, for instance, asks for 1.91:1).
|
|
21
|
+
-->
|
|
22
|
+
$ const METADATA_IMAGE_WIDTH = 1200;
|
|
23
|
+
$ const METADATA_IMAGE_HEIGHT = 675;
|
|
24
|
+
|
|
25
|
+
<!--
|
|
26
|
+
Which of the two srcs an asset gets. Cropping to 16:9 discards height, so letterbox instead
|
|
27
|
+
once that loss would exceed a quarter of the image -- that threshold is a crop rectangle
|
|
28
|
+
narrower than 4:3. Landscape assets are cropped (a 3:2 loses ~16%, and any focal point the
|
|
29
|
+
editor set in the CMS is honored); portrait and squarish assets are padded so they survive
|
|
30
|
+
intact.
|
|
31
|
+
-->
|
|
32
|
+
$ const OG_IMAGE_MIN_CROP_RATIO = 4 / 3;
|
|
33
|
+
|
|
9
34
|
$ const { config } = out.global;
|
|
10
35
|
$ const { id, structuredDataQueryFragment } = input;
|
|
11
36
|
$ const { spreadFragmentName, processedFragment } = extractFragmentData(structuredDataQueryFragment);
|
|
@@ -33,7 +58,22 @@ fragment ContentPageMetadataFragment on Content {
|
|
|
33
58
|
expiresDate
|
|
34
59
|
image {
|
|
35
60
|
id
|
|
36
|
-
|
|
61
|
+
# picks between the two srcs below -- see OG_IMAGE_MIN_CROP_RATIO
|
|
62
|
+
cropRectangle {
|
|
63
|
+
width
|
|
64
|
+
height
|
|
65
|
+
}
|
|
66
|
+
# Both srcs flatten onto white (bg), because a transparent og:image renders black in most
|
|
67
|
+
# social clients.
|
|
68
|
+
#
|
|
69
|
+
# The cropped one stays unaliased: google-structured-data/content.js reads
|
|
70
|
+
# metadata.image.src off this same node for the JSON-LD thumbnailUrl and logo, so
|
|
71
|
+
# renaming it would empty those out.
|
|
72
|
+
src(input: { useCropRectangle: true, options: { auto: "format,compress", bg: "ffffff", fit: "crop", h: "${METADATA_IMAGE_HEIGHT}", q: "70", w: "${METADATA_IMAGE_WIDTH}" } })
|
|
73
|
+
# On the filled src, bg flattens transparency within the image while fillColor pads the
|
|
74
|
+
# space around it -- both are needed. fill is required too: fit=fill without it is
|
|
75
|
+
# ignored by imgix and the image comes back unfilled.
|
|
76
|
+
filledSrc: src(input: { useCropRectangle: true, options: { auto: "format,compress", bg: "ffffff", fill: "solid", fillColor: "ffffff", fit: "fill", h: "${METADATA_IMAGE_HEIGHT}", q: "70", w: "${METADATA_IMAGE_WIDTH}" } })
|
|
37
77
|
}
|
|
38
78
|
}
|
|
39
79
|
userRegistration {
|
|
@@ -85,7 +125,17 @@ fragment ContentPageMetadataFragment on Content {
|
|
|
85
125
|
edges {
|
|
86
126
|
node {
|
|
87
127
|
id
|
|
88
|
-
|
|
128
|
+
# Feeds the JSON-LD image array (google-structured-data/content.js) -- Google's channel,
|
|
129
|
+
# not the social cards'. Discover asks for at least 1200px wide, over 300,000 total
|
|
130
|
+
# pixels and a 16x9 aspect, and 16x9 is also one of the ratios Article rich results
|
|
131
|
+
# recommend.
|
|
132
|
+
#
|
|
133
|
+
# Cropped unconditionally, unlike the og:image above, which letterboxes a portrait rather
|
|
134
|
+
# than gut it. Discover renders a landscape card and crops whatever it is given, so
|
|
135
|
+
# cropping here mostly moves that decision somewhere we control. Previously fit=max,
|
|
136
|
+
# which never upscales and so capped this at the source's own width -- measured on the
|
|
137
|
+
# live CDN, 6 of 15 sampled articles emitted under 1200px.
|
|
138
|
+
src(input: { options: { auto: "format,compress", bg: "ffffff", fit: "crop", h: "${METADATA_IMAGE_HEIGHT}", q: 70, w: "${METADATA_IMAGE_WIDTH}" } })
|
|
89
139
|
}
|
|
90
140
|
}
|
|
91
141
|
}
|
|
@@ -102,17 +152,15 @@ $ const contentGatingHandler = isFunction(globalContentGatingHandler) ? globalCo
|
|
|
102
152
|
<if(id)>
|
|
103
153
|
<marko-web-query|{ node }| name="content" params={ id, queryFragment }>
|
|
104
154
|
<!--
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
origin+path into the first param's name.
|
|
155
|
+
Crop landscape assets to 16:9 and letterbox the rest. An asset with no crop rectangle has
|
|
156
|
+
an unknown shape, so it is cropped: that is correct for the landscape images that make up
|
|
157
|
+
almost all editorial content, and cropping is the branch that honors a focal point.
|
|
109
158
|
-->
|
|
110
|
-
$ const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
159
|
+
$ const ogImageSrc = (() => {
|
|
160
|
+
const image = get(node, "metadata.image") || {};
|
|
161
|
+
const { width, height } = image.cropRectangle || {};
|
|
162
|
+
const shouldFill = Boolean(width && height) && (width / height) < OG_IMAGE_MIN_CROP_RATIO;
|
|
163
|
+
return shouldFill ? image.filledSrc : image.src;
|
|
116
164
|
})();
|
|
117
165
|
$ const metadata = {
|
|
118
166
|
type: node.type,
|
|
@@ -123,11 +171,11 @@ $ const contentGatingHandler = isFunction(globalContentGatingHandler) ? globalCo
|
|
|
123
171
|
// `no-index` forces non-indexable (e.g. print views); it never makes an excluded page indexable.
|
|
124
172
|
noIndex: Boolean(input.noIndex) || get(node, "siteContext.noIndex") || config.website("id") !== get(node, "primarySite.id"),
|
|
125
173
|
robots: input.robots,
|
|
126
|
-
imageSrc:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
174
|
+
imageSrc: ogImageSrc,
|
|
175
|
+
// Both srcs fill the requested box exactly, so these always describe the bytes served.
|
|
176
|
+
// Only claim them when there is a src to describe: with none, common.marko substitutes
|
|
177
|
+
// the site's fallback image, whose dimensions are not ours to assert.
|
|
178
|
+
imageDimensions: ogImageSrc ? { width: METADATA_IMAGE_WIDTH, height: METADATA_IMAGE_HEIGHT } : {},
|
|
131
179
|
};
|
|
132
180
|
$ const publishedDate = get(node, "metadata.publishedDate");
|
|
133
181
|
$ const updatedDate = get(node, "metadata.updatedDate");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/content.marko",
|
|
6
6
|
marko_component = require("./content.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_gql = require("graphql-tag"),
|
|
@@ -31,6 +31,12 @@ var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
|
31
31
|
function render(input, out, __component, component, state) {
|
|
32
32
|
var data = input;
|
|
33
33
|
|
|
34
|
+
const METADATA_IMAGE_WIDTH = 1200;
|
|
35
|
+
|
|
36
|
+
const METADATA_IMAGE_HEIGHT = 675;
|
|
37
|
+
|
|
38
|
+
const OG_IMAGE_MIN_CROP_RATIO = 4 / 3;
|
|
39
|
+
|
|
34
40
|
const { config } = out.global;
|
|
35
41
|
|
|
36
42
|
const { id, structuredDataQueryFragment } = input;
|
|
@@ -61,7 +67,22 @@ fragment ContentPageMetadataFragment on Content {
|
|
|
61
67
|
expiresDate
|
|
62
68
|
image {
|
|
63
69
|
id
|
|
64
|
-
|
|
70
|
+
# picks between the two srcs below -- see OG_IMAGE_MIN_CROP_RATIO
|
|
71
|
+
cropRectangle {
|
|
72
|
+
width
|
|
73
|
+
height
|
|
74
|
+
}
|
|
75
|
+
# Both srcs flatten onto white (bg), because a transparent og:image renders black in most
|
|
76
|
+
# social clients.
|
|
77
|
+
#
|
|
78
|
+
# The cropped one stays unaliased: google-structured-data/content.js reads
|
|
79
|
+
# metadata.image.src off this same node for the JSON-LD thumbnailUrl and logo, so
|
|
80
|
+
# renaming it would empty those out.
|
|
81
|
+
src(input: { useCropRectangle: true, options: { auto: "format,compress", bg: "ffffff", fit: "crop", h: "${METADATA_IMAGE_HEIGHT}", q: "70", w: "${METADATA_IMAGE_WIDTH}" } })
|
|
82
|
+
# On the filled src, bg flattens transparency within the image while fillColor pads the
|
|
83
|
+
# space around it -- both are needed. fill is required too: fit=fill without it is
|
|
84
|
+
# ignored by imgix and the image comes back unfilled.
|
|
85
|
+
filledSrc: src(input: { useCropRectangle: true, options: { auto: "format,compress", bg: "ffffff", fill: "solid", fillColor: "ffffff", fit: "fill", h: "${METADATA_IMAGE_HEIGHT}", q: "70", w: "${METADATA_IMAGE_WIDTH}" } })
|
|
65
86
|
}
|
|
66
87
|
}
|
|
67
88
|
userRegistration {
|
|
@@ -113,7 +134,17 @@ fragment ContentPageMetadataFragment on Content {
|
|
|
113
134
|
edges {
|
|
114
135
|
node {
|
|
115
136
|
id
|
|
116
|
-
|
|
137
|
+
# Feeds the JSON-LD image array (google-structured-data/content.js) -- Google's channel,
|
|
138
|
+
# not the social cards'. Discover asks for at least 1200px wide, over 300,000 total
|
|
139
|
+
# pixels and a 16x9 aspect, and 16x9 is also one of the ratios Article rich results
|
|
140
|
+
# recommend.
|
|
141
|
+
#
|
|
142
|
+
# Cropped unconditionally, unlike the og:image above, which letterboxes a portrait rather
|
|
143
|
+
# than gut it. Discover renders a landscape card and crops whatever it is given, so
|
|
144
|
+
# cropping here mostly moves that decision somewhere we control. Previously fit=max,
|
|
145
|
+
# which never upscales and so capped this at the source's own width -- measured on the
|
|
146
|
+
# live CDN, 6 of 15 sampled articles emitted under 1200px.
|
|
147
|
+
src(input: { options: { auto: "format,compress", bg: "ffffff", fit: "crop", h: "${METADATA_IMAGE_HEIGHT}", q: 70, w: "${METADATA_IMAGE_WIDTH}" } })
|
|
117
148
|
}
|
|
118
149
|
}
|
|
119
150
|
}
|
|
@@ -144,12 +175,11 @@ ${processedFragment}
|
|
|
144
175
|
}
|
|
145
176
|
},
|
|
146
177
|
renderBody: function(out, { node }) {
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
178
|
+
const ogImageSrc = (() => {
|
|
179
|
+
const image = get(node, "metadata.image") || {};
|
|
180
|
+
const { width, height } = image.cropRectangle || {};
|
|
181
|
+
const shouldFill = Boolean(width && height) && (width / height) < OG_IMAGE_MIN_CROP_RATIO;
|
|
182
|
+
return shouldFill ? image.filledSrc : image.src;
|
|
153
183
|
})();
|
|
154
184
|
|
|
155
185
|
const metadata = {
|
|
@@ -161,11 +191,11 @@ ${processedFragment}
|
|
|
161
191
|
// `no-index` forces non-indexable (e.g. print views); it never makes an excluded page indexable.
|
|
162
192
|
noIndex: Boolean(input.noIndex) || get(node, "siteContext.noIndex") || config.website("id") !== get(node, "primarySite.id"),
|
|
163
193
|
robots: input.robots,
|
|
164
|
-
imageSrc:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
194
|
+
imageSrc: ogImageSrc,
|
|
195
|
+
// Both srcs fill the requested box exactly, so these always describe the bytes served.
|
|
196
|
+
// Only claim them when there is a src to describe: with none, common.marko substitutes
|
|
197
|
+
// the site's fallback image, whose dimensions are not ours to assert.
|
|
198
|
+
imageDimensions: ogImageSrc ? { width: METADATA_IMAGE_WIDTH, height: METADATA_IMAGE_HEIGHT } : {},
|
|
169
199
|
};
|
|
170
200
|
|
|
171
201
|
const publishedDate = get(node, "metadata.publishedDate");
|
|
@@ -233,7 +263,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
233
263
|
}, marko_component);
|
|
234
264
|
|
|
235
265
|
marko_template.meta = {
|
|
236
|
-
id: "/@mindful-web/marko-web$1.
|
|
266
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/content.marko",
|
|
237
267
|
component: "./content.marko",
|
|
238
268
|
tags: [
|
|
239
269
|
"./components/common.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/default.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
common_template = require("./components/common.marko"),
|
|
8
8
|
marko_loadTag = require("marko/dist/runtime/helpers/load-tag"),
|
|
@@ -22,7 +22,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
marko_template.meta = {
|
|
25
|
-
id: "/@mindful-web/marko-web$1.
|
|
25
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/default.marko",
|
|
26
26
|
tags: [
|
|
27
27
|
"./components/common.marko"
|
|
28
28
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/dynamic-page.marko",
|
|
6
6
|
marko_component = require("./dynamic-page.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_gql = require("graphql-tag"),
|
|
@@ -75,7 +75,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
75
75
|
}, marko_component);
|
|
76
76
|
|
|
77
77
|
marko_template.meta = {
|
|
78
|
-
id: "/@mindful-web/marko-web$1.
|
|
78
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/dynamic-page.marko",
|
|
79
79
|
component: "./dynamic-page.marko",
|
|
80
80
|
tags: [
|
|
81
81
|
"./components/common.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/magazine-issue.marko",
|
|
6
6
|
marko_component = require("./magazine-issue.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_gql = require("graphql-tag"),
|
|
@@ -74,7 +74,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
74
74
|
}, marko_component);
|
|
75
75
|
|
|
76
76
|
marko_template.meta = {
|
|
77
|
-
id: "/@mindful-web/marko-web$1.
|
|
77
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/magazine-issue.marko",
|
|
78
78
|
component: "./magazine-issue.marko",
|
|
79
79
|
tags: [
|
|
80
80
|
"./components/common.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/magazine-publication.marko",
|
|
6
6
|
marko_component = require("./magazine-publication.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_gql = require("graphql-tag"),
|
|
@@ -70,7 +70,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
70
70
|
}, marko_component);
|
|
71
71
|
|
|
72
72
|
marko_template.meta = {
|
|
73
|
-
id: "/@mindful-web/marko-web$1.
|
|
73
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/magazine-publication.marko",
|
|
74
74
|
component: "./magazine-publication.marko",
|
|
75
75
|
tags: [
|
|
76
76
|
"./components/common.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/metadata/website-section.marko",
|
|
6
6
|
marko_component = require("./website-section.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_gql = require("graphql-tag"),
|
|
@@ -85,7 +85,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
85
85
|
}, marko_component);
|
|
86
86
|
|
|
87
87
|
marko_template.meta = {
|
|
88
|
-
id: "/@mindful-web/marko-web$1.
|
|
88
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/metadata/website-section.marko",
|
|
89
89
|
component: "./website-section.marko",
|
|
90
90
|
tags: [
|
|
91
91
|
"./components/common.marko",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/rel-canonical.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_utils_module = require("@mindful-web/utils"),
|
|
8
8
|
utils_module = module_utils_module.default || module_utils_module,
|
|
@@ -38,5 +38,5 @@ marko_template._ = marko_renderer(render, {
|
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
marko_template.meta = {
|
|
41
|
-
id: "/@mindful-web/marko-web$1.
|
|
41
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/rel-canonical.marko"
|
|
42
42
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/title.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_utils_module = require("@mindful-web/utils"),
|
|
8
8
|
utils_module = module_utils_module.default || module_utils_module,
|
|
@@ -42,5 +42,5 @@ marko_template._ = marko_renderer(render, {
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
marko_template.meta = {
|
|
45
|
-
id: "/@mindful-web/marko-web$1.
|
|
45
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/title.marko"
|
|
46
46
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/page/wrapper.marko",
|
|
6
6
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
7
7
|
module_objectPath_module = require("@mindful-web/object-path"),
|
|
8
8
|
objectPath_module = module_objectPath_module.default || module_objectPath_module,
|
|
@@ -56,7 +56,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
marko_template.meta = {
|
|
59
|
-
id: "/@mindful-web/marko-web$1.
|
|
59
|
+
id: "/@mindful-web/marko-web$1.93.0/components/page/wrapper.marko",
|
|
60
60
|
tags: [
|
|
61
61
|
"../element/index.marko"
|
|
62
62
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web$1.93.0/components/resolve/page.marko",
|
|
6
6
|
marko_component = require("./page.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_utils_module = require("@mindful-web/utils"),
|
|
@@ -41,7 +41,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
41
41
|
}, marko_component);
|
|
42
42
|
|
|
43
43
|
marko_template.meta = {
|
|
44
|
-
id: "/@mindful-web/marko-web$1.
|
|
44
|
+
id: "/@mindful-web/marko-web$1.93.0/components/resolve/page.marko",
|
|
45
45
|
component: "./page.marko",
|
|
46
46
|
tags: [
|
|
47
47
|
"@mindful-web/marko-core/components/resolve.marko"
|