feat: add slug console

This commit is contained in:
KazooTTT
2024-11-23 21:47:33 +08:00
parent 99421ebfa4
commit 1e15a382a1

View File

@ -5,6 +5,7 @@ import PageViews from '../PageViews'
const pathname = new URL(Astro.request.url).pathname
const isBlogPost = pathname.startsWith('/blog/') && pathname !== '/blog'
const slug = pathname === '/' ? 'home' : pathname.replace(/^\/|\/$/g, '')
console.log('Slug:', slug)
---
<footer class='mx-auto mt-24 w-full'>