fix: change backtick to regular after making script loading less hacky
This commit is contained in:
		@@ -23,7 +23,7 @@ export function pageResources(
 | 
				
			|||||||
  staticResources: StaticResources,
 | 
					  staticResources: StaticResources,
 | 
				
			||||||
): StaticResources {
 | 
					): StaticResources {
 | 
				
			||||||
  const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json")
 | 
					  const contentIndexPath = joinSegments(baseDir, "static/contentIndex.json")
 | 
				
			||||||
  const contentIndexScript = `const fetchData = fetch(\`${contentIndexPath}\`).then(data => data.json())`
 | 
					  const contentIndexScript = `const fetchData = fetch("${contentIndexPath}").then(data => data.json())`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return {
 | 
					  return {
 | 
				
			||||||
    css: [joinSegments(baseDir, "index.css"), ...staticResources.css],
 | 
					    css: [joinSegments(baseDir, "index.css"), ...staticResources.css],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,11 +85,11 @@ function addGlobalPageResources(
 | 
				
			|||||||
    componentResources.afterDOMLoaded.push(`
 | 
					    componentResources.afterDOMLoaded.push(`
 | 
				
			||||||
      window.dataLayer = window.dataLayer || [];
 | 
					      window.dataLayer = window.dataLayer || [];
 | 
				
			||||||
      function gtag() { dataLayer.push(arguments); }
 | 
					      function gtag() { dataLayer.push(arguments); }
 | 
				
			||||||
      gtag(\`js\`, new Date());
 | 
					      gtag("js", new Date());
 | 
				
			||||||
      gtag(\`config\`, \`${tagId}\`, { send_page_view: false });
 | 
					      gtag("config", "${tagId}", { send_page_view: false });
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
      document.addEventListener(\`nav\`, () => {
 | 
					      document.addEventListener("nav", () => {
 | 
				
			||||||
        gtag(\`event\`, \`page_view\`, {
 | 
					        gtag("event", "page_view", {
 | 
				
			||||||
          page_title: document.title,
 | 
					          page_title: document.title,
 | 
				
			||||||
          page_location: location.href,
 | 
					          page_location: location.href,
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user