Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A a11yproject.com
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The A11Y Project
  • a11yproject.com
  • Merge requests
  • !1178

Add environment variables to project

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Dan Matthew requested to merge github/fork/danielmatthew/add-env-vars into main Jan 17, 2021
  • Overview 4
  • Commits 7
  • Pipelines 1
  • Changes 6

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

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/danielmatthew/add-env-vars