@reuters-graphics/graphics-components 0.0.19 → 0.0.21
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.
|
@@ -81,15 +81,11 @@ const getOrigin = (baseUrl) => {
|
|
|
81
81
|
};
|
|
82
82
|
$: origin = getOrigin(baseUrl);
|
|
83
83
|
$: canonicalUrl = origin + pageUrl.pathname;
|
|
84
|
-
let hasEnabledPublisherTags = false;
|
|
85
84
|
// Only fire analytics on prod sites
|
|
86
85
|
$: {
|
|
87
86
|
if (typeof window !== 'undefined' && includeAnalytics) {
|
|
88
87
|
analytics(canonicalUrl, seoTitle);
|
|
89
|
-
|
|
90
|
-
publisherTags();
|
|
91
|
-
hasEnabledPublisherTags = true;
|
|
92
|
-
}
|
|
88
|
+
publisherTags();
|
|
93
89
|
}
|
|
94
90
|
}
|
|
95
91
|
const orgLdJson = {
|
|
@@ -142,64 +138,66 @@ $: articleLdJson = {
|
|
|
142
138
|
</script>
|
|
143
139
|
|
|
144
140
|
<svelte:head>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
141
|
+
{#key canonicalUrl}
|
|
142
|
+
<title>{seoTitle}</title>
|
|
143
|
+
<meta name="description" content="{seoDescription}" />
|
|
144
|
+
<link rel="canonical" href="{canonicalUrl}" />
|
|
145
|
+
<link
|
|
146
|
+
rel="shortcut icon"
|
|
147
|
+
type="image/x-icon"
|
|
148
|
+
href="https://s3.reutersmedia.net/resources_v2/images/favicon/favicon.ico"
|
|
149
|
+
/>
|
|
150
|
+
<link
|
|
151
|
+
rel="icon"
|
|
152
|
+
type="image/png"
|
|
153
|
+
href="https://s3.reutersmedia.net/resources_v2/images/favicon/favicon-16x16.png"
|
|
154
|
+
sizes="16x16"
|
|
155
|
+
/>
|
|
156
|
+
<link
|
|
157
|
+
rel="icon"
|
|
158
|
+
type="image/png"
|
|
159
|
+
href="https://s1.reutersmedia.net/resources_v2/images/favicon/favicon-32x32.png"
|
|
160
|
+
sizes="32x32"
|
|
161
|
+
/>
|
|
162
|
+
<link
|
|
163
|
+
rel="icon"
|
|
164
|
+
type="image/png"
|
|
165
|
+
href="https://s3.reutersmedia.net/resources_v2/images/favicon/favicon-96x96.png"
|
|
166
|
+
sizes="96x96"
|
|
167
|
+
/>
|
|
171
168
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
169
|
+
<meta property="og:url" content="{canonicalUrl}" />
|
|
170
|
+
<meta property="og:type" content="article" />
|
|
171
|
+
<meta property="og:title" content="{shareTitle}" itemprop="name" />
|
|
172
|
+
<meta
|
|
173
|
+
property="og:description"
|
|
174
|
+
content="{shareDescription}"
|
|
175
|
+
itemprop="description"
|
|
176
|
+
/>
|
|
177
|
+
<meta property="og:image" content="{shareImgPath}" itemprop="image" />
|
|
178
|
+
<meta property="og:site_name" content="Reuters" />
|
|
182
179
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
180
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
181
|
+
<meta name="twitter:site" content="@ReutersGraphics" />
|
|
182
|
+
<meta name="twitter:creator" content="@ReutersGraphics" />
|
|
183
|
+
<meta name="twitter:domain" content="{origin}" />
|
|
184
|
+
<meta name="twitter:title" content="{shareTitle}" />
|
|
185
|
+
<meta name="twitter:description" content="{shareDescription}" />
|
|
186
|
+
<meta name="twitter:image" content="{shareImgPath}" />
|
|
187
|
+
{#if shareImgAlt}
|
|
188
|
+
<meta name="twitter:image:alt" content="{shareImgAlt}" />
|
|
189
|
+
{/if}
|
|
193
190
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
<meta property="fb:app_id" content="319194411438328" />
|
|
192
|
+
<meta property="fb:admins" content="616167736" />
|
|
193
|
+
<meta property="fb:admins" content="625796953" />
|
|
194
|
+
<meta property="fb:admins" content="571759798" />
|
|
198
195
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
196
|
+
{@html `<${'script'} type="application/ld+json">${JSON.stringify(
|
|
197
|
+
orgLdJson
|
|
198
|
+
)}</script>`}
|
|
199
|
+
{@html `<${'script'} type="application/ld+json">${JSON.stringify(
|
|
200
|
+
articleLdJson
|
|
201
|
+
)}</script>`}
|
|
202
|
+
{/key}
|
|
205
203
|
</svelte:head>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export default () => {
|
|
2
|
+
const { protocol } = document.location;
|
|
3
|
+
const gptScript = document.querySelector(
|
|
4
|
+
`script[src="${protocol}//www.googletagservices.com/tag/js/gpt.js"]`
|
|
5
|
+
);
|
|
6
|
+
// Only do this once.
|
|
7
|
+
if (gptScript) return;
|
|
2
8
|
const googletag = window.googletag || {};
|
|
3
9
|
googletag.cmd = googletag.cmd || [];
|
|
4
|
-
(function() {
|
|
10
|
+
(function () {
|
|
5
11
|
const gads = document.createElement('script');
|
|
6
12
|
gads.async = true;
|
|
7
13
|
gads.type = 'text/javascript';
|
|
@@ -12,7 +18,7 @@ export default () => {
|
|
|
12
18
|
const node = document.getElementsByTagName('script')[0];
|
|
13
19
|
node.parentNode.insertBefore(gads, node);
|
|
14
20
|
})();
|
|
15
|
-
googletag.cmd.push(function() {
|
|
21
|
+
googletag.cmd.push(function () {
|
|
16
22
|
googletag
|
|
17
23
|
.defineSlot(
|
|
18
24
|
'/4735792/reuters_investigates',
|