diff --git a/app/layout.tsx b/app/layout.tsx index 1927de2..89d9395 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,6 @@ import glob from "fast-glob"; import type { Metadata } from "next"; -import PlausibleProvider from "next-plausible"; import { Layout } from "../components/Layout"; import type { Section } from "../components/SectionProvider"; import { Providers } from "./providers"; @@ -47,12 +46,11 @@ export default async function RootLayout({ - diff --git a/bun.lockb b/bun.lockb index 4ab5076..2ecb9e2 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 432959b..51dcf31 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ "mdast-util-to-string": "^4.0.0", "mdx-annotations": "^0.1.4", "next": "^14.2.13", - "next-plausible": "^3.12.4", "next-themes": "^0.3.0", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/public/pl.js b/public/pl.js new file mode 100644 index 0000000..193bbf9 --- /dev/null +++ b/public/pl.js @@ -0,0 +1 @@ +!function(){"use strict";var l=window.location,i=window.document,t=i.currentScript,r=t.getAttribute("data-api")||new URL(t.src).origin+"/api/event",o=t.getAttribute("data-domain");function s(t,e){t&&console.warn("Ignoring Event: "+t),e&&e.callback&&e.callback()}function e(t,e){if(/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(l.hostname)||"file:"===l.protocol)return s("localhost",e);if((window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress)&&!window.__plausible)return s(null,e);try{if("true"===window.localStorage.plausible_ignore)return s("localStorage flag",e)}catch(t){}var a={},n=(a.n=t,a.u=l.href,a.d=o,a.r=i.referrer||null,e&&e.meta&&(a.m=JSON.stringify(e.meta)),e&&e.props&&(a.p=e.props),new XMLHttpRequest);n.open("POST",r,!0),n.setRequestHeader("Content-Type","text/plain"),n.send(JSON.stringify(a)),n.onreadystatechange=function(){4===n.readyState&&e&&e.callback&&e.callback({status:n.status})}}var a=window.plausible&&window.plausible.q||[];window.plausible=e;for(var n,p=0;p