From b3fb2dd120d995231917f5a451352bcf3be82ca4 Mon Sep 17 00:00:00 2001 From: jamerrq Date: Mon, 12 Feb 2024 13:52:26 -0500 Subject: [PATCH] feat: librecounter stats --- src/layouts/blog-layout.astro | 3 +++ src/layouts/layout.astro | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/layouts/blog-layout.astro b/src/layouts/blog-layout.astro index 30d3a1e..90e5d86 100644 --- a/src/layouts/blog-layout.astro +++ b/src/layouts/blog-layout.astro @@ -9,6 +9,9 @@ interface Props { } const { frontmatter }: Props = Astro.props import Buttons from '@components/main/buttons.astro' +const libreCounterEndpoint = + 'https://librecounter.org/count?url=http://jamerrq.deno.dev&userAgent=roboto/1.0' +fetch(libreCounterEndpoint) --- diff --git a/src/layouts/layout.astro b/src/layouts/layout.astro index 7775dd3..6bc208d 100644 --- a/src/layouts/layout.astro +++ b/src/layouts/layout.astro @@ -10,6 +10,9 @@ import '@fontsource/rubik-doodle-shadow' import { ViewTransitions } from 'astro:transitions' import Background from '@components/main/background.astro' const BODY_CLASS = import.meta.env.MODE === 'development' ? 'debug-screens' : '' +const libreCounterEndpoint = + 'https://librecounter.org/count?url=http://jamerrq.deno.dev&userAgent=roboto/1.0' +fetch(libreCounterEndpoint) --- @@ -58,10 +61,7 @@ const BODY_CLASS = import.meta.env.MODE === 'development' ? 'debug-screens' : '' rel='noreferrer' class='hidden' > - +