change umami link

master
Niko PLP 8 months ago
parent 0f5bee2aed
commit 766f6b8bc2
  1. 1
      package.json
  2. 29
      src/components/HeadCommon.astro
  3. 9
      src/layouts/MainLayout.astro

@ -22,7 +22,6 @@
"@types/react-dom": "^18.0.0",
"algoliasearch": "^4.9.1",
"astro": "^1.6.7",
"astro-analytics": "^2.5.0",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",

@ -25,23 +25,14 @@ import "../styles/index.css";
<!-- This is intentionally inlined to avoid FOUC -->
<script is:inline>
const root = document.documentElement;
const theme = localStorage.getItem("theme");
if (
theme === "dark" ||
(!theme && window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
root.classList.add("theme-dark");
} else {
root.classList.remove("theme-dark");
}
const root = document.documentElement;
const theme = localStorage.getItem("theme");
if (
theme === "dark" ||
(!theme && window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
root.classList.add("theme-dark");
} else {
root.classList.remove("theme-dark");
}
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<!-- <script async src="https://www.googletagmanager.com/gtag/js?id=G-TEL60V1WM9" is:inline></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-TEL60V1WM9');
</script> -->

@ -8,7 +8,6 @@ import RightSidebar from "../components/RightSidebar/RightSidebar.astro";
import * as CONFIG from "../config";
import type { MarkdownHeading } from "astro";
import Footer from "../components/Footer/Footer.astro";
import { Umami } from "astro-analytics";
type Props = {
frontmatter: CONFIG.Frontmatter;
@ -150,9 +149,11 @@ const githubEditUrl = `${CONFIG.GITHUB_EDIT_URL}/${currentFile}`;
<Footer path={currentFile} />
{
import.meta.env.MODE != "development" && (
<Umami
dataId="20626904-aeef-44b5-b016-2459fe244d80"
site="https://log.nextgraph.org/script.js"
<script
defer=""
src="https://log.nextgraph.org/script.js"
host="/script.js"
data-website-id="20626904-aeef-44b5-b016-2459fe244d80"
/>
)
}

Loading…
Cancel
Save