generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
head.html
31 lines (29 loc) · 1.5 KB
/
head.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta property="og:site_name" content="GolfDigest.com">
<meta property="fb:app_id" content="22983068728">
<meta property="fb:admins" content="108943">
<link rel="preload" href="/styles/fonts/Tungsten/Tungsten-Semibold_Web.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/styles/fonts/Gotham/Gotham-Bold_Web.woff2" as="font" type="font/woff2" crossorigin />
<link rel="stylesheet" href="/styles/fonts.css" media="print" onload="this.media='all'" />
<script src="/scripts/lib-franklin.js" type="module"></script>
<script src="/scripts/scripts.js" type="module"></script>
<link rel="stylesheet" href="/styles/styles.css"/>
<link rel="icon" href="data:,">
<script>
// Fixes vanity url relative images
const prodHostname = 'gd.headwire.workers.dev';
const findVanityURL = (pathname) => ['story', 'gallery', 'products'].find((prefix) => pathname.startsWith(`/${prefix}/`));
const { pathname, hostname, origin } = window.location;
if (hostname === prodHostname) {
const vanityURL = findVanityURL(pathname);
if (vanityURL) {
const base = document.createElement('base');
base.href = origin;
document.head.appendChild(base);
}
}
// Newsletter redirection
if (hostname === 'main--helix-sportsmagazine--headwirecom.hlx.page' && document.head.querySelector('meta[name="template"][content="newsletter"]')) {
window.location.href = `https://gd-newsletter.headwire.workers.dev${pathname}`
}
</script>