@parameter1/base-cms-marko-web 2.46.1 → 2.62.0
Sign up to get free protection for your applications and to get access to all the features.
- package/components/browser-component.marko.js +57 -18
- package/components/document/components/body-wrapper.marko.js +8 -8
- package/components/document/components/error.marko.js +9 -9
- package/components/document/components/live-reload.marko.js +7 -7
- package/components/document/container.marko.js +9 -9
- package/components/document/index.marko.js +18 -18
- package/components/element/content/byline.marko +1 -0
- package/components/element/index.marko.js +8 -8
- package/components/element/website-section/name.marko +1 -0
- package/components/load-more/index.marko.js +119 -0
- package/components/load-more/trigger.marko.js +7 -7
- package/components/page/container.marko.js +8 -8
- package/components/page/description.marko.js +7 -7
- package/components/page/layouts/content.marko +6 -2
- package/components/page/layouts/default.marko.js +9 -8
- package/components/page/layouts/marko.json +2 -0
- package/components/page/metadata/components/common.marko.js +13 -8
- package/components/page/metadata/content.marko +34 -3
- package/components/page/metadata/default.marko.js +7 -7
- package/components/page/metadata/google-structured-data/content.js +72 -37
- package/components/page/metadata/marko.json +3 -1
- package/components/page/rel-canonical.marko.js +8 -8
- package/components/page/title.marko.js +8 -8
- package/components/page/wrapper.marko.js +10 -10
- package/node-require.js +6 -0
- package/package.json +3 -2
- package/start-server.js +1 -1
@@ -1,42 +1,81 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/browser-component.marko",
|
6
|
+
marko_component = require("./browser-component.marko"),
|
7
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
|
+
module_defaultValue = require("@parameter1/base-cms-marko-core/utils/default-value"),
|
9
|
+
defaultValue = module_defaultValue.default || module_defaultValue,
|
7
10
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
11
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
9
12
|
randomElementId = module_baseCmsUtils_module.randomElementId,
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
module_renderComponent = require("../utils/render-ssr-component"),
|
14
|
+
renderComponent = module_renderComponent.default || module_renderComponent,
|
15
|
+
marko_str = require("marko/src/runtime/helpers/to-string"),
|
16
|
+
marko_web_resolve_template = require("@parameter1/base-cms-marko-core/components/resolve.marko"),
|
17
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
18
|
+
marko_web_resolve_tag = marko_loadTag(marko_web_resolve_template),
|
19
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
20
|
+
marko_assign = require("marko/src/runtime/helpers/assign");
|
13
21
|
|
14
22
|
function render(input, out, __component, component, state) {
|
15
23
|
var data = input;
|
16
24
|
|
17
25
|
const id = randomElementId({ prefix: 'vue' });
|
18
26
|
|
27
|
+
const tag = defaultValue(input.tag, "div");
|
28
|
+
|
29
|
+
const { name } = input;
|
30
|
+
|
31
|
+
const ssr = defaultValue(input.ssr, false);
|
32
|
+
|
33
|
+
const hydrate = ssr ? true : defaultValue(input.hydrate, false);
|
34
|
+
|
19
35
|
const props = JSON.stringify(input.props || {});
|
20
36
|
|
21
|
-
const contents =
|
37
|
+
const contents = `CMSBrowserComponents.load({ el: '#${id}', name: '${name}', props: ${props}, hydrate: ${hydrate} });`;
|
38
|
+
|
39
|
+
if (ssr) {
|
40
|
+
const { compiledVueComponents } = out.global;
|
41
|
+
|
42
|
+
const Component = compiledVueComponents[name];
|
22
43
|
|
23
|
-
|
24
|
-
marko_attr("id", id) +
|
25
|
-
">");
|
44
|
+
if (!Component) throw new Error(`No compiled Vue template found for ${name}. Unable to render server-side.`);
|
26
45
|
|
27
|
-
|
28
|
-
|
46
|
+
marko_web_resolve_tag({
|
47
|
+
promise: renderComponent(Component, {
|
48
|
+
id: id,
|
49
|
+
props: input.props
|
50
|
+
}),
|
51
|
+
renderBody: function(out, { resolved: html }) {
|
52
|
+
out.w(marko_str(html));
|
53
|
+
}
|
54
|
+
}, out, __component, "0");
|
55
|
+
} else {
|
56
|
+
marko_dynamicTag(out, tag, function() {
|
57
|
+
return marko_assign({}, input.attrs, {
|
58
|
+
id: id,
|
59
|
+
class: input.class
|
60
|
+
});
|
61
|
+
}, function(out) {
|
62
|
+
marko_dynamicTag(out, input.renderBody, null, null, null, null, __component, "2");
|
63
|
+
}, null, null, __component, "1");
|
29
64
|
}
|
30
65
|
|
31
|
-
out.w(
|
32
|
-
|
66
|
+
out.w("<script>" +
|
67
|
+
marko_str(contents) +
|
68
|
+
"</script>");
|
33
69
|
}
|
34
70
|
|
35
71
|
marko_template._ = marko_renderer(render, {
|
36
|
-
|
37
|
-
|
38
|
-
});
|
72
|
+
___type: marko_componentType
|
73
|
+
}, marko_component);
|
39
74
|
|
40
75
|
marko_template.meta = {
|
41
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
76
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/browser-component.marko",
|
77
|
+
component: "./browser-component.marko",
|
78
|
+
tags: [
|
79
|
+
"@parameter1/base-cms-marko-core/components/resolve.marko"
|
80
|
+
]
|
42
81
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
7
|
-
marko_dynamicTag = require("marko/
|
8
|
-
marko_attrs = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/document/components/body-wrapper.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
8
|
+
marko_attrs = require("marko/src/runtime/html/helpers/attrs");
|
9
9
|
|
10
10
|
function render(input, out, __component, component, state) {
|
11
11
|
var data = input;
|
@@ -24,10 +24,10 @@ function render(input, out, __component, component, state) {
|
|
24
24
|
}
|
25
25
|
|
26
26
|
marko_template._ = marko_renderer(render, {
|
27
|
-
|
28
|
-
|
27
|
+
___implicit: true,
|
28
|
+
___type: marko_componentType
|
29
29
|
});
|
30
30
|
|
31
31
|
marko_template.meta = {
|
32
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
32
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/document/components/body-wrapper.marko"
|
33
33
|
};
|
@@ -1,19 +1,19 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/document/components/error.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_isDev = require("../../../utils/is-dev"),
|
8
8
|
isDev = module_isDev.default || module_isDev,
|
9
9
|
marko_web_page_title_template = require("../../page/title.marko"),
|
10
|
-
marko_loadTag = require("marko/
|
10
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
11
11
|
marko_web_page_title_tag = marko_loadTag(marko_web_page_title_template),
|
12
|
-
helpers_escape_xml = require("marko/
|
12
|
+
helpers_escape_xml = require("marko/src/runtime/html/helpers/escape-xml"),
|
13
13
|
marko_escapeXml = helpers_escape_xml.x,
|
14
14
|
marko_web_page_wrapper_template = require("../../page/wrapper.marko"),
|
15
15
|
marko_web_page_wrapper_tag = marko_loadTag(marko_web_page_wrapper_template),
|
16
|
-
marko_dynamicTag = require("marko/
|
16
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag");
|
17
17
|
|
18
18
|
function render(input, out, __component, component, state) {
|
19
19
|
var data = input;
|
@@ -72,12 +72,12 @@ function render(input, out, __component, component, state) {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
marko_template._ = marko_renderer(render, {
|
75
|
-
|
76
|
-
|
75
|
+
___implicit: true,
|
76
|
+
___type: marko_componentType
|
77
77
|
});
|
78
78
|
|
79
79
|
marko_template.meta = {
|
80
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
80
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/document/components/error.marko",
|
81
81
|
tags: [
|
82
82
|
"../../page/title.marko",
|
83
83
|
"../../page/wrapper.marko"
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/document/components/live-reload.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_isDev = require("../../../utils/is-dev"),
|
8
8
|
isDev = module_isDev.default || module_isDev,
|
9
|
-
marko_attr = require("marko/
|
9
|
+
marko_attr = require("marko/src/runtime/html/helpers/attr");
|
10
10
|
|
11
11
|
function render(input, out, __component, component, state) {
|
12
12
|
var data = input;
|
@@ -21,10 +21,10 @@ function render(input, out, __component, component, state) {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
marko_template._ = marko_renderer(render, {
|
24
|
-
|
25
|
-
|
24
|
+
___implicit: true,
|
25
|
+
___type: marko_componentType
|
26
26
|
});
|
27
27
|
|
28
28
|
marko_template.meta = {
|
29
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
29
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/document/components/live-reload.marko"
|
30
30
|
};
|
@@ -1,16 +1,16 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/document/container.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
|
-
marko_dynamicTag = require("marko/
|
11
|
-
marko_assign = require("marko/
|
10
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
11
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
12
12
|
marko_web_page_container_template = require("../page/container.marko"),
|
13
|
-
marko_loadTag = require("marko/
|
13
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
14
14
|
marko_web_page_container_tag = marko_loadTag(marko_web_page_container_template);
|
15
15
|
|
16
16
|
function render(input, out, __component, component, state) {
|
@@ -42,12 +42,12 @@ function render(input, out, __component, component, state) {
|
|
42
42
|
}
|
43
43
|
|
44
44
|
marko_template._ = marko_renderer(render, {
|
45
|
-
|
46
|
-
|
45
|
+
___implicit: true,
|
46
|
+
___type: marko_componentType
|
47
47
|
});
|
48
48
|
|
49
49
|
marko_template.meta = {
|
50
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
50
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/document/container.marko",
|
51
51
|
tags: [
|
52
52
|
"../page/container.marko"
|
53
53
|
]
|
@@ -1,26 +1,26 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/document/index.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
10
|
-
marko_attr = require("marko/
|
11
|
-
marko_forOf = require("marko/
|
12
|
-
marko_dynamicTag = require("marko/
|
13
|
-
marko_assign = require("marko/
|
10
|
+
marko_attr = require("marko/src/runtime/html/helpers/attr"),
|
11
|
+
marko_forOf = require("marko/src/runtime/helpers/for-of"),
|
12
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
13
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
14
14
|
marko_web_document_container_template = require("./container.marko"),
|
15
|
-
marko_loadTag = require("marko/
|
15
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
16
16
|
marko_web_document_container_tag = marko_loadTag(marko_web_document_container_template),
|
17
17
|
live_reload_template = require("./components/live-reload.marko"),
|
18
18
|
live_reload_tag = marko_loadTag(live_reload_template),
|
19
19
|
body_wrapper_template = require("./components/body-wrapper.marko"),
|
20
20
|
body_wrapper_tag = marko_loadTag(body_wrapper_template),
|
21
|
-
init_components_tag = marko_loadTag(require("marko/
|
22
|
-
await_reorderer_tag = marko_loadTag(require("marko/
|
23
|
-
_preferred_script_location_tag = marko_loadTag(require("marko/
|
21
|
+
init_components_tag = marko_loadTag(require("marko/src/core-tags/components/init-components-tag")),
|
22
|
+
await_reorderer_tag = marko_loadTag(require("marko/src/core-tags/core/await/reorderer-renderer")),
|
23
|
+
_preferred_script_location_tag = marko_loadTag(require("marko/src/core-tags/components/preferred-script-location-tag"));
|
24
24
|
|
25
25
|
function render(input, out, __component, component, state) {
|
26
26
|
var data = input;
|
@@ -84,7 +84,7 @@ function render(input, out, __component, component, state) {
|
|
84
84
|
marko_dynamicTag(out, input.belowWrapper, null, null, null, null, __component, "15");
|
85
85
|
|
86
86
|
marko_forOf(config.sources(), function(src) {
|
87
|
-
out.w("<script
|
87
|
+
out.w("<script" +
|
88
88
|
marko_attr("src", src) +
|
89
89
|
"></script>");
|
90
90
|
});
|
@@ -101,18 +101,18 @@ function render(input, out, __component, component, state) {
|
|
101
101
|
}
|
102
102
|
|
103
103
|
marko_template._ = marko_renderer(render, {
|
104
|
-
|
105
|
-
|
104
|
+
___implicit: true,
|
105
|
+
___type: marko_componentType
|
106
106
|
});
|
107
107
|
|
108
108
|
marko_template.meta = {
|
109
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
109
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/document/index.marko",
|
110
110
|
tags: [
|
111
111
|
"./container.marko",
|
112
112
|
"./components/live-reload.marko",
|
113
113
|
"./components/body-wrapper.marko",
|
114
|
-
"marko/
|
115
|
-
"marko/
|
116
|
-
"marko/
|
114
|
+
"marko/src/core-tags/components/init-components-tag",
|
115
|
+
"marko/src/core-tags/core/await/reorderer-renderer",
|
116
|
+
"marko/src/core-tags/components/preferred-script-location-tag"
|
117
117
|
]
|
118
118
|
};
|
@@ -1,14 +1,14 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/element/index.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
|
-
marko_dynamicTag = require("marko/
|
11
|
-
marko_assign = require("marko/
|
10
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
11
|
+
marko_assign = require("marko/src/runtime/helpers/assign");
|
12
12
|
|
13
13
|
function render(input, out, __component, component, state) {
|
14
14
|
var data = input;
|
@@ -38,10 +38,10 @@ function render(input, out, __component, component, state) {
|
|
38
38
|
}
|
39
39
|
|
40
40
|
marko_template._ = marko_renderer(render, {
|
41
|
-
|
42
|
-
|
41
|
+
___implicit: true,
|
42
|
+
___type: marko_componentType
|
43
43
|
});
|
44
44
|
|
45
45
|
marko_template.meta = {
|
46
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
46
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/element/index.marko"
|
47
47
|
};
|
@@ -0,0 +1,119 @@
|
|
1
|
+
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/load-more/index.marko",
|
6
|
+
marko_component = require("./index.marko"),
|
7
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
|
+
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
9
|
+
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
10
|
+
getAsObject = module_baseCmsObjectPath_module.getAsObject,
|
11
|
+
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
12
|
+
marko_web_browser_component_template = require("../browser-component.marko"),
|
13
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
14
|
+
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template),
|
15
|
+
marko_str = require("marko/src/runtime/helpers/to-string"),
|
16
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
17
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
18
|
+
marko_web_load_more_trigger_template = require("./trigger.marko"),
|
19
|
+
marko_web_load_more_trigger_tag = marko_loadTag(marko_web_load_more_trigger_template),
|
20
|
+
marko_web_page_container_template = require("../page/container.marko"),
|
21
|
+
marko_web_page_container_tag = marko_loadTag(marko_web_page_container_template),
|
22
|
+
marko_web_query_template = require("@parameter1/base-cms-marko-core/components/queries/index.marko"),
|
23
|
+
marko_web_query_tag = marko_loadTag(marko_web_query_template);
|
24
|
+
|
25
|
+
function render(input, out, __component, component, state) {
|
26
|
+
var data = input;
|
27
|
+
|
28
|
+
const { components, fragments } = out.global;
|
29
|
+
|
30
|
+
const Component = components.get(input.componentName);
|
31
|
+
|
32
|
+
const pageNumber = input.pageNumber || 1;
|
33
|
+
|
34
|
+
const queryParams = {
|
35
|
+
...getAsObject(input, "queryParams"),
|
36
|
+
queryName: "LoadMore",
|
37
|
+
queryFragment: fragments.get(input.fragmentName),
|
38
|
+
};
|
39
|
+
|
40
|
+
if (Component) {
|
41
|
+
marko_web_query_tag({
|
42
|
+
collapsible: true,
|
43
|
+
name: input.queryName,
|
44
|
+
params: queryParams,
|
45
|
+
renderBody: function(out, { nodes, pageInfo }) {
|
46
|
+
if (nodes.length) {
|
47
|
+
marko_web_page_container_tag(marko_assign({
|
48
|
+
tag: "section"
|
49
|
+
}, input.pageInput, {
|
50
|
+
modifiers: ["load-more", `page-${pageNumber}`, ...getAsArray(input, "pageInput.modifiers")],
|
51
|
+
attrs: input.attrs,
|
52
|
+
renderBody: function(out) {
|
53
|
+
marko_web_browser_component_tag({
|
54
|
+
name: "TriggerInViewEvent",
|
55
|
+
props: {
|
56
|
+
eventName: "load-more-in-view",
|
57
|
+
data: {
|
58
|
+
page_number: pageNumber + 1
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}, out, __component, "2");
|
62
|
+
|
63
|
+
if ((pageNumber === 1) && input.header) {
|
64
|
+
out.w("<div class=\"load-more-header\">" +
|
65
|
+
marko_str(input.header) +
|
66
|
+
"</div>");
|
67
|
+
}
|
68
|
+
|
69
|
+
marko_dynamicTag(out, Component, function() {
|
70
|
+
return marko_assign({}, input.componentInput, {
|
71
|
+
nodes: nodes,
|
72
|
+
"page-info": pageInfo,
|
73
|
+
"page-number": pageNumber
|
74
|
+
});
|
75
|
+
}, null, null, null, __component, "4");
|
76
|
+
|
77
|
+
const { endCursor, hasNextPage } = pageInfo;
|
78
|
+
|
79
|
+
delete queryParams.skip;
|
80
|
+
|
81
|
+
delete queryParams.queryFragment;
|
82
|
+
|
83
|
+
delete queryParams.renderBody;
|
84
|
+
|
85
|
+
const provide = {
|
86
|
+
...input,
|
87
|
+
queryParams: { ...queryParams, after: endCursor },
|
88
|
+
};
|
89
|
+
|
90
|
+
marko_web_load_more_trigger_tag(marko_assign({}, input.triggerInput, {
|
91
|
+
appendTo: input.appendTo,
|
92
|
+
maxPages: input.maxPages,
|
93
|
+
expand: input.expand,
|
94
|
+
pageNumber: pageNumber,
|
95
|
+
provide: provide,
|
96
|
+
show: hasNextPage
|
97
|
+
}), out, __component, "5");
|
98
|
+
}
|
99
|
+
}), out, __component, "1");
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}, out, __component, "0");
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
marko_template._ = marko_renderer(render, {
|
107
|
+
___type: marko_componentType
|
108
|
+
}, marko_component);
|
109
|
+
|
110
|
+
marko_template.meta = {
|
111
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/load-more/index.marko",
|
112
|
+
component: "./",
|
113
|
+
tags: [
|
114
|
+
"../browser-component.marko",
|
115
|
+
"./trigger.marko",
|
116
|
+
"../page/container.marko",
|
117
|
+
"@parameter1/base-cms-marko-core/components/queries/index.marko"
|
118
|
+
]
|
119
|
+
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/load-more/trigger.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
marko_web_browser_component_template = require("../browser-component.marko"),
|
8
|
-
marko_loadTag = require("marko/
|
8
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
9
9
|
marko_web_browser_component_tag = marko_loadTag(marko_web_browser_component_template);
|
10
10
|
|
11
11
|
function render(input, out, __component, component, state) {
|
@@ -28,12 +28,12 @@ function render(input, out, __component, component, state) {
|
|
28
28
|
}
|
29
29
|
|
30
30
|
marko_template._ = marko_renderer(render, {
|
31
|
-
|
32
|
-
|
31
|
+
___implicit: true,
|
32
|
+
___type: marko_componentType
|
33
33
|
});
|
34
34
|
|
35
35
|
marko_template.meta = {
|
36
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
36
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/load-more/trigger.marko",
|
37
37
|
tags: [
|
38
38
|
"../browser-component.marko"
|
39
39
|
]
|
@@ -1,14 +1,14 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/container.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
|
-
marko_dynamicTag = require("marko/
|
11
|
-
marko_assign = require("marko/
|
10
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
11
|
+
marko_assign = require("marko/src/runtime/helpers/assign");
|
12
12
|
|
13
13
|
function render(input, out, __component, component, state) {
|
14
14
|
var data = input;
|
@@ -37,10 +37,10 @@ function render(input, out, __component, component, state) {
|
|
37
37
|
}
|
38
38
|
|
39
39
|
marko_template._ = marko_renderer(render, {
|
40
|
-
|
41
|
-
|
40
|
+
___implicit: true,
|
41
|
+
___type: marko_componentType
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
45
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/container.marko"
|
46
46
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
7
|
-
marko_attr = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/description.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
|
+
marko_attr = require("marko/src/runtime/html/helpers/attr");
|
8
8
|
|
9
9
|
function render(input, out, __component, component, state) {
|
10
10
|
var data = input;
|
@@ -17,10 +17,10 @@ function render(input, out, __component, component, state) {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
marko_template._ = marko_renderer(render, {
|
20
|
-
|
21
|
-
|
20
|
+
___implicit: true,
|
21
|
+
___type: marko_componentType
|
22
22
|
});
|
23
23
|
|
24
24
|
marko_template.meta = {
|
25
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
25
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/description.marko"
|
26
26
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
$ const { id, type } = input;
|
1
|
+
$ const { structuredDataQueryFragment, buildStructuredData, id, type } = input;
|
2
2
|
$ const { document } = out.global;
|
3
3
|
|
4
4
|
<${document}
|
@@ -7,7 +7,11 @@ $ const { document } = out.global;
|
|
7
7
|
foot=input.foot
|
8
8
|
>
|
9
9
|
<@head>
|
10
|
-
<marko-web-content-page-metadata
|
10
|
+
<marko-web-content-page-metadata
|
11
|
+
id=id
|
12
|
+
structured-data-query-fragment=structuredDataQueryFragment
|
13
|
+
build-structured-data=buildStructuredData
|
14
|
+
/>
|
11
15
|
<${input.head} />
|
12
16
|
</@head>
|
13
17
|
<!-- Note: camelcased vars due to nest input of dynamic document. perhaps a marko bug -->
|
@@ -1,13 +1,13 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/layouts/default.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
marko_web_default_page_metadata_template = require("../metadata/default.marko"),
|
8
|
-
marko_loadTag = require("marko/
|
8
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
9
9
|
marko_web_default_page_metadata_tag = marko_loadTag(marko_web_default_page_metadata_template),
|
10
|
-
marko_dynamicTag = require("marko/
|
10
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag");
|
11
11
|
|
12
12
|
function render(input, out, __component, component, state) {
|
13
13
|
var data = input;
|
@@ -38,6 +38,7 @@ function render(input, out, __component, component, state) {
|
|
38
38
|
belowPage: input.belowPage,
|
39
39
|
page: {
|
40
40
|
for: type,
|
41
|
+
attrs: input.attrs,
|
41
42
|
renderBody: function(out) {
|
42
43
|
marko_dynamicTag(out, input.page, null, null, null, null, __component, "6");
|
43
44
|
}
|
@@ -48,12 +49,12 @@ function render(input, out, __component, component, state) {
|
|
48
49
|
}
|
49
50
|
|
50
51
|
marko_template._ = marko_renderer(render, {
|
51
|
-
|
52
|
-
|
52
|
+
___implicit: true,
|
53
|
+
___type: marko_componentType
|
53
54
|
});
|
54
55
|
|
55
56
|
marko_template.meta = {
|
56
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
57
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/layouts/default.marko",
|
57
58
|
tags: [
|
58
59
|
"../metadata/default.marko"
|
59
60
|
]
|
@@ -1,18 +1,18 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/metadata/components/common.marko",
|
6
6
|
marko_component = require("./common.marko"),
|
7
|
-
marko_renderer = require("marko/
|
7
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
8
8
|
marko_web_page_title_template = require("../../title.marko"),
|
9
|
-
marko_loadTag = require("marko/
|
9
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
10
10
|
marko_web_page_title_tag = marko_loadTag(marko_web_page_title_template),
|
11
11
|
marko_web_page_description_template = require("../../description.marko"),
|
12
12
|
marko_web_page_description_tag = marko_loadTag(marko_web_page_description_template),
|
13
13
|
marko_web_page_rel_canonical_template = require("../../rel-canonical.marko"),
|
14
14
|
marko_web_page_rel_canonical_tag = marko_loadTag(marko_web_page_rel_canonical_template),
|
15
|
-
marko_attr = require("marko/
|
15
|
+
marko_attr = require("marko/src/runtime/html/helpers/attr");
|
16
16
|
|
17
17
|
function render(input, out, __component, component, state) {
|
18
18
|
var data = input;
|
@@ -25,6 +25,7 @@ function render(input, out, __component, component, state) {
|
|
25
25
|
canonicalUrl,
|
26
26
|
imageSrc,
|
27
27
|
description,
|
28
|
+
noIndex,
|
28
29
|
} = input;
|
29
30
|
|
30
31
|
const fallbackImage = config.fallbackImage();
|
@@ -45,6 +46,10 @@ function render(input, out, __component, component, state) {
|
|
45
46
|
url: canonicalUrl
|
46
47
|
}, out, __component, "2");
|
47
48
|
|
49
|
+
if (noIndex) {
|
50
|
+
out.w("<meta name=\"robots\" content=\"noindex\">");
|
51
|
+
}
|
52
|
+
|
48
53
|
if (title) {
|
49
54
|
out.w("<meta property=\"og:title\" item-prop=\"name\"" +
|
50
55
|
marko_attr("content", title) +
|
@@ -65,7 +70,7 @@ function render(input, out, __component, component, state) {
|
|
65
70
|
marko_attr("content", href) +
|
66
71
|
">");
|
67
72
|
}
|
68
|
-
}, out, __component, "
|
73
|
+
}, out, __component, "6");
|
69
74
|
|
70
75
|
out.w("<meta property=\"og:site_name\"" +
|
71
76
|
marko_attr("content", config.website("name")) +
|
@@ -89,11 +94,11 @@ function render(input, out, __component, component, state) {
|
|
89
94
|
}
|
90
95
|
|
91
96
|
marko_template._ = marko_renderer(render, {
|
92
|
-
|
97
|
+
___type: marko_componentType
|
93
98
|
}, marko_component);
|
94
99
|
|
95
100
|
marko_template.meta = {
|
96
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
101
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/metadata/components/common.marko",
|
97
102
|
component: "./common.marko",
|
98
103
|
tags: [
|
99
104
|
"../../title.marko",
|
@@ -1,16 +1,19 @@
|
|
1
1
|
import gql from "graphql-tag";
|
2
2
|
import { get } from "@parameter1/base-cms-object-path";
|
3
|
-
import { warn } from "@parameter1/base-cms-utils";
|
4
|
-
import
|
3
|
+
import { warn, isFunction } from "@parameter1/base-cms-utils";
|
4
|
+
import { extractFragmentData } from "@parameter1/base-cms-web-common/src/utils";
|
5
|
+
import defaultBuildStructuredData from "./google-structured-data/content";
|
5
6
|
|
6
7
|
<!-- @todo This data should generated and saved to the content object as flat data, so no relationships are required. -->
|
7
8
|
|
8
|
-
$ const { id } = input;
|
9
|
+
$ const { id, structuredDataQueryFragment } = input;
|
10
|
+
$ const { spreadFragmentName, processedFragment } = extractFragmentData(structuredDataQueryFragment);
|
9
11
|
$ const queryFragment = gql`
|
10
12
|
fragment ContentPageMetadataFragment on Content {
|
11
13
|
id
|
12
14
|
type
|
13
15
|
siteContext {
|
16
|
+
url
|
14
17
|
path
|
15
18
|
canonicalUrl
|
16
19
|
noIndex
|
@@ -31,6 +34,10 @@ fragment ContentPageMetadataFragment on Content {
|
|
31
34
|
... on ContentVideo {
|
32
35
|
embedSrc
|
33
36
|
}
|
37
|
+
... on ContentPodcast {
|
38
|
+
fileSrc
|
39
|
+
fileName
|
40
|
+
}
|
34
41
|
... on Authorable {
|
35
42
|
authors {
|
36
43
|
edges {
|
@@ -41,6 +48,26 @@ fragment ContentPageMetadataFragment on Content {
|
|
41
48
|
}
|
42
49
|
}
|
43
50
|
}
|
51
|
+
... on Addressable {
|
52
|
+
address1
|
53
|
+
address2
|
54
|
+
city
|
55
|
+
state
|
56
|
+
zip
|
57
|
+
country
|
58
|
+
}
|
59
|
+
... on Contactable {
|
60
|
+
phone
|
61
|
+
tollfree
|
62
|
+
fax
|
63
|
+
website
|
64
|
+
title
|
65
|
+
mobile
|
66
|
+
publicEmail
|
67
|
+
}
|
68
|
+
... on ContentCompany {
|
69
|
+
email
|
70
|
+
}
|
44
71
|
images(input:{ pagination: { limit: 0 }, sort: { order: values } }) {
|
45
72
|
edges {
|
46
73
|
node {
|
@@ -49,9 +76,13 @@ fragment ContentPageMetadataFragment on Content {
|
|
49
76
|
}
|
50
77
|
}
|
51
78
|
}
|
79
|
+
${spreadFragmentName}
|
52
80
|
}
|
81
|
+
${processedFragment}
|
53
82
|
`;
|
54
83
|
|
84
|
+
$ const buildStructuredData = isFunction(input.buildStructuredData) ? input.buildStructuredData : defaultBuildStructuredData;
|
85
|
+
|
55
86
|
<if(id)>
|
56
87
|
<marko-web-query|{ node }| name="content" params={ id, queryFragment }>
|
57
88
|
$ const metadata = {
|
@@ -1,11 +1,11 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/metadata/default.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
common_template = require("./components/common.marko"),
|
8
|
-
marko_loadTag = require("marko/
|
8
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
9
9
|
common_tag = marko_loadTag(common_template);
|
10
10
|
|
11
11
|
function render(input, out, __component, component, state) {
|
@@ -17,12 +17,12 @@ function render(input, out, __component, component, state) {
|
|
17
17
|
}
|
18
18
|
|
19
19
|
marko_template._ = marko_renderer(render, {
|
20
|
-
|
21
|
-
|
20
|
+
___implicit: true,
|
21
|
+
___type: marko_componentType
|
22
22
|
});
|
23
23
|
|
24
24
|
marko_template.meta = {
|
25
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
25
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/metadata/default.marko",
|
26
26
|
tags: [
|
27
27
|
"./components/common.marko"
|
28
28
|
]
|
@@ -20,57 +20,92 @@ const getImages = (node) => {
|
|
20
20
|
module.exports = (node) => {
|
21
21
|
const publishedISOString = node.published ? (new Date(node.published)).toISOString() : undefined;
|
22
22
|
const updatedISOString = node.updated ? (new Date(node.updated)).toISOString() : undefined;
|
23
|
+
const siteUrl = get(node, 'siteContext.url');
|
24
|
+
const canonicalUrl = get(node, 'siteContext.canonicalUrl');
|
25
|
+
|
26
|
+
const defaultStruturedData = {
|
27
|
+
'@context': 'https://schema.org',
|
28
|
+
'@type': 'Article',
|
29
|
+
mainEntityOfPage: {
|
30
|
+
'@type': 'WebPage',
|
31
|
+
'@id': get(node, 'siteContext.canonicalUrl'),
|
32
|
+
},
|
33
|
+
headline: get(node, 'metadata.title'),
|
34
|
+
name: get(node, 'metadata.title'),
|
35
|
+
...(get(node, 'metadata.description') && { description: get(node, 'metadata.description') }),
|
36
|
+
...(get(node, 'metadata.image.src') && { thumbnailUrl: get(node, 'metadata.image.src') }),
|
37
|
+
...(getImages(node) && { image: getImages(node) }),
|
38
|
+
datePublished: publishedISOString,
|
39
|
+
dateModified: updatedISOString,
|
40
|
+
url: canonicalUrl,
|
41
|
+
...(siteUrl !== canonicalUrl && { url: siteUrl, isBasedOn: canonicalUrl }),
|
42
|
+
...(getAuthor(node) && { author: getAuthor(node) }),
|
43
|
+
};
|
44
|
+
|
23
45
|
if (node.type === 'video') {
|
24
|
-
|
25
|
-
|
46
|
+
return JSON.stringify({
|
47
|
+
...defaultStruturedData,
|
26
48
|
'@type': 'VideoObject',
|
27
|
-
name: get(node, 'metadata.title'),
|
28
|
-
description: get(node, 'metadata.description'),
|
29
|
-
thumbnailUrl: get(node, 'metadata.image.src'),
|
30
49
|
uploadDate: publishedISOString,
|
31
50
|
contentUrl: get(node, 'siteContext.canonicalUrl'),
|
32
|
-
author: getAuthor(node),
|
33
51
|
embedUrl: get(node, 'embedSrc'),
|
34
52
|
});
|
35
|
-
return structuredData;
|
36
53
|
}
|
37
54
|
|
38
|
-
|
39
|
-
|
40
|
-
const
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
55
|
+
if (node.type === 'podcast') {
|
56
|
+
// Set associatedMedia if audio file is present
|
57
|
+
const associatedMedia = (get(node, 'fileName') && get(node, 'fileSrc'))
|
58
|
+
? {
|
59
|
+
'@type': 'AudioObject',
|
60
|
+
contentUrl: get(node, 'fileSrc'),
|
61
|
+
name: get(node, 'fileName'),
|
62
|
+
}
|
63
|
+
: undefined;
|
64
|
+
return JSON.stringify({
|
65
|
+
...defaultStruturedData,
|
66
|
+
'@type': 'PodcastEpisode',
|
47
67
|
headline: get(node, 'metadata.title'),
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
68
|
+
...(associatedMedia && { associatedMedia }),
|
69
|
+
});
|
70
|
+
}
|
71
|
+
|
72
|
+
if (node.type === 'company') {
|
73
|
+
// Concat address1 && address2 if present
|
74
|
+
const streetAddresses = [];
|
75
|
+
if (get(node, 'address1')) streetAddresses.push(get(node, 'address1'));
|
76
|
+
if (get(node, 'address2')) streetAddresses.push(get(node, 'address2'));
|
77
|
+
const streetAddress = streetAddresses.join(' ');
|
78
|
+
// Display and set address info if present
|
79
|
+
const showAddress = (streetAddress || get(node, 'city') || get(node, 'state') || get(node, 'zip'));
|
80
|
+
const address = (showAddress)
|
81
|
+
? {
|
82
|
+
'@type': 'PostalAddress',
|
83
|
+
...(get(node, 'city') && { addressLocality: get(node, 'city') }),
|
84
|
+
...(get(node, 'state') && { addressLocality: get(node, 'state') }),
|
85
|
+
...(get(node, 'zip') && { postalCode: get(node, 'zip') }),
|
86
|
+
...(streetAddress && { streetAddress }),
|
87
|
+
}
|
88
|
+
: undefined;
|
89
|
+
// Set tollfree || phone if present
|
90
|
+
const telephone = get(node, 'tollfree') || get(node, 'phone');
|
91
|
+
|
92
|
+
return JSON.stringify({
|
93
|
+
...defaultStruturedData,
|
94
|
+
'@type': 'Organization',
|
95
|
+
address,
|
96
|
+
...(telephone && { telephone }),
|
97
|
+
...(get(node, 'metadata.image.src') && { logo: get(node, 'metadata.image.src') }),
|
98
|
+
...(get(node, 'email') && { email: get(node, 'email') }),
|
99
|
+
...(get(node, 'fax') && { faxNumber: get(node, 'fax') }),
|
53
100
|
});
|
54
|
-
return structuredData;
|
55
101
|
}
|
56
102
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
'@
|
61
|
-
'@type': 'Article',
|
62
|
-
mainEntityOfPage: {
|
63
|
-
'@type': 'WebPage',
|
64
|
-
'@id': get(node, 'siteContext.canonicalUrl'),
|
65
|
-
},
|
103
|
+
if (['article', 'news'].includes(node.type)) {
|
104
|
+
return JSON.stringify({
|
105
|
+
...defaultStruturedData,
|
106
|
+
'@type': 'NewsArticle',
|
66
107
|
headline: get(node, 'metadata.title'),
|
67
|
-
image: getImages(node),
|
68
|
-
datePublished: publishedISOString,
|
69
|
-
dateModified: updatedISOString,
|
70
|
-
author: getAuthor(node),
|
71
|
-
description: get(node, 'metadata.description'),
|
72
108
|
});
|
73
|
-
return structuredData;
|
74
109
|
}
|
75
110
|
|
76
111
|
return undefined;
|
@@ -8,7 +8,9 @@
|
|
8
8
|
},
|
9
9
|
"<marko-web-content-page-metadata>": {
|
10
10
|
"template": "./content.marko",
|
11
|
-
"@id": "number"
|
11
|
+
"@id": "number",
|
12
|
+
"@structured-data-query-fragment": "string",
|
13
|
+
"@build-structured-data": "function"
|
12
14
|
},
|
13
15
|
"<marko-web-website-section-page-metadata>": {
|
14
16
|
"template": "./website-section.marko",
|
@@ -1,14 +1,14 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/rel-canonical.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
8
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
9
9
|
cleanPath = module_baseCmsUtils_module.cleanPath,
|
10
|
-
marko_dynamicTag = require("marko/
|
11
|
-
marko_attr = require("marko/
|
10
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
11
|
+
marko_attr = require("marko/src/runtime/html/helpers/attr");
|
12
12
|
|
13
13
|
function render(input, out, __component, component, state) {
|
14
14
|
var data = input;
|
@@ -33,10 +33,10 @@ function render(input, out, __component, component, state) {
|
|
33
33
|
}
|
34
34
|
|
35
35
|
marko_template._ = marko_renderer(render, {
|
36
|
-
|
37
|
-
|
36
|
+
___implicit: true,
|
37
|
+
___type: marko_componentType
|
38
38
|
});
|
39
39
|
|
40
40
|
marko_template.meta = {
|
41
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
41
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/rel-canonical.marko"
|
42
42
|
};
|
@@ -1,14 +1,14 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/title.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsUtils_module = require("@parameter1/base-cms-utils"),
|
8
8
|
baseCmsUtils_module = module_baseCmsUtils_module.default || module_baseCmsUtils_module,
|
9
9
|
cleanPath = module_baseCmsUtils_module.cleanPath,
|
10
|
-
marko_dynamicTag = require("marko/
|
11
|
-
helpers_escape_xml = require("marko/
|
10
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag"),
|
11
|
+
helpers_escape_xml = require("marko/src/runtime/html/helpers/escape-xml"),
|
12
12
|
marko_escapeXml = helpers_escape_xml.x;
|
13
13
|
|
14
14
|
function render(input, out, __component, component, state) {
|
@@ -37,10 +37,10 @@ function render(input, out, __component, component, state) {
|
|
37
37
|
}
|
38
38
|
|
39
39
|
marko_template._ = marko_renderer(render, {
|
40
|
-
|
41
|
-
|
40
|
+
___implicit: true,
|
41
|
+
___type: marko_componentType
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
45
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/title.marko"
|
46
46
|
};
|
@@ -1,18 +1,18 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$2.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/src/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$2.46.1/components/page/wrapper.marko",
|
6
|
+
marko_renderer = require("marko/src/runtime/components/renderer"),
|
7
7
|
module_baseCmsObjectPath_module = require("@parameter1/base-cms-object-path"),
|
8
8
|
baseCmsObjectPath_module = module_baseCmsObjectPath_module.default || module_baseCmsObjectPath_module,
|
9
9
|
getAsArray = module_baseCmsObjectPath_module.getAsArray,
|
10
|
-
marko_forOf = require("marko/
|
11
|
-
marko_assign = require("marko/
|
10
|
+
marko_forOf = require("marko/src/runtime/helpers/for-of"),
|
11
|
+
marko_assign = require("marko/src/runtime/helpers/assign"),
|
12
12
|
marko_web_element_template = require("../element"),
|
13
|
-
marko_loadTag = require("marko/
|
13
|
+
marko_loadTag = require("marko/src/runtime/helpers/load-tag"),
|
14
14
|
marko_web_element_tag = marko_loadTag(marko_web_element_template),
|
15
|
-
marko_dynamicTag = require("marko/
|
15
|
+
marko_dynamicTag = require("marko/src/runtime/helpers/dynamic-tag");
|
16
16
|
|
17
17
|
function render(input, out, __component, component, state) {
|
18
18
|
var data = input;
|
@@ -51,12 +51,12 @@ function render(input, out, __component, component, state) {
|
|
51
51
|
}
|
52
52
|
|
53
53
|
marko_template._ = marko_renderer(render, {
|
54
|
-
|
55
|
-
|
54
|
+
___implicit: true,
|
55
|
+
___type: marko_componentType
|
56
56
|
});
|
57
57
|
|
58
58
|
marko_template.meta = {
|
59
|
-
id: "/@parameter1/base-cms-marko-web$2.
|
59
|
+
id: "/@parameter1/base-cms-marko-web$2.46.1/components/page/wrapper.marko",
|
60
60
|
tags: [
|
61
61
|
"../element"
|
62
62
|
]
|
package/node-require.js
ADDED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parameter1/base-cms-marko-web",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.62.0",
|
4
4
|
"description": "Core Marko+Express components for BaseCMS websites",
|
5
5
|
"author": "Jacob Bare <jacob@parameter1.com>",
|
6
6
|
"main": "index.js",
|
@@ -21,6 +21,7 @@
|
|
21
21
|
"@parameter1/base-cms-graphql-fragment-types": "^2.45.0",
|
22
22
|
"@parameter1/base-cms-image": "^2.45.0",
|
23
23
|
"@parameter1/base-cms-inflector": "^2.0.0",
|
24
|
+
"@parameter1/base-cms-marko-node-require": "^2.57.0",
|
24
25
|
"@parameter1/base-cms-object-path": "^2.45.0",
|
25
26
|
"@parameter1/base-cms-tenant-context": "^2.0.0",
|
26
27
|
"@parameter1/base-cms-utils": "^2.22.2",
|
@@ -50,5 +51,5 @@
|
|
50
51
|
"publishConfig": {
|
51
52
|
"access": "public"
|
52
53
|
},
|
53
|
-
"gitHead": "
|
54
|
+
"gitHead": "3474ceb0c6572bb6f52bb6adf3ff3ad578918a45"
|
54
55
|
}
|
package/start-server.js
CHANGED