Skip to content

Commit 6e6a695

Browse files
committed
Revert "feat:更新umami数据监控"
This reverts commit 598ca4c.
1 parent 598ca4c commit 6e6a695

7 files changed

Lines changed: 0 additions & 157 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ jobs:
6363
run: pnpm install --frozen-lockfile
6464

6565
- name: Build with Astro
66-
env:
67-
UMAMI_API_KEY: ${{ secrets.UMAMI_API_KEY }}
68-
UMAMI_WEBSITE_ID: ${{ secrets.UMAMI_WEBSITE_ID }}
6966
run: pnpm build
7067

7168
- name: Upload artifact

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ pnpm-debug.log*
1616
# environment variables
1717
.env
1818
.env.production
19-
.env.example
20-
.env.local
2119

2220
# macOS-specific files
2321
.DS_Store

src/components/widget/UmamiStats.svelte

Lines changed: 0 additions & 75 deletions
This file was deleted.

src/global.d.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ declare global {
1111
}>;
1212
}>;
1313
};
14-
umami?: {
15-
track: (eventName: string, options?: Record<string, any>) => void;
16-
};
1714
}
1815
}
1916

src/layouts/Layout.astro

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ const bannerOffset =
147147

148148
<link rel="alternate" type="application/rss+xml" title={profileConfig.name} href={`${Astro.site}rss.xml`}/>
149149

150-
<script defer src="https://cloud.umami.is/script.js" data-website-id="aad4376c-e3ff-45d4-ac57-1aad8b2ef7ae"></script>
151-
152150
</head>
153151
<body class=" min-h-screen transition " class:list={[{"lg:is-home": isHomePage, "enable-banner": enableBanner}]}
154152
data-overlayscrollbars-initialize
@@ -434,14 +432,6 @@ const setup = () => {
434432
if (heightExtend) {
435433
heightExtend.classList.remove('hidden')
436434
}
437-
438-
// Track page view with Umami
439-
if (window.umami) {
440-
window.umami.track('page_view', {
441-
url: window.location.pathname,
442-
title: document.title
443-
})
444-
}
445435
});
446436
window.swup.hooks.on('visit:end', (_visit: {to: {url: string}}) => {
447437
setTimeout(() => {

src/pages/[...page].astro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import PostPage from "../components/PostPage.astro";
55
import { PAGE_SIZE } from "../constants/constants";
66
import MainGridLayout from "../layouts/MainGridLayout.astro";
77
import { getSortedPosts } from "../utils/content-utils";
8-
import UmamiStats from "../components/widget/UmamiStats.svelte";
98
109
export const getStaticPaths = (async ({ paginate }) => {
1110
const allBlogPosts = await getSortedPosts();
@@ -21,5 +20,4 @@ const len = page.data.length;
2120
<MainGridLayout>
2221
<PostPage page={page}></PostPage>
2322
<Pagination class="mx-auto onload-animation" page={page} style={`animation-delay: calc(var(--content-delay) + ${(len)*50}ms)`}></Pagination>
24-
{page.currentPage === 1 && <UmamiStats client:load />}
2523
</MainGridLayout>

src/pages/api/umami-stats.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)