A first pass. In #937 I'd seen reference to #966 (closed), so in development mode we don't pull in the service worker partial, nor the analytics.
Before:
<head>
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-2419836-9"></script>
<script>…</script>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
[ Truncated… ]
<link rel="sitemap" type="application/xml" title="The A11Y Project" href="/sitemap.xml"><link rel="author" href="humans.txt">
<script async="">if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register("/sw.js");
});
}
</script>
</head>
After:
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
[ Truncated… ]
<link rel="sitemap" type="application/xml" title="The A11Y Project" href="/sitemap.xml"><link rel="author" href="humans.txt">
</head>
Closes #937