mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-24 11:11:30 +08:00
feat: add slug console
This commit is contained in:
@ -5,6 +5,7 @@ import PageViews from '../PageViews'
|
|||||||
const pathname = new URL(Astro.request.url).pathname
|
const pathname = new URL(Astro.request.url).pathname
|
||||||
const isBlogPost = pathname.startsWith('/blog/') && pathname !== '/blog'
|
const isBlogPost = pathname.startsWith('/blog/') && pathname !== '/blog'
|
||||||
const slug = pathname === '/' ? 'home' : pathname.replace(/^\/|\/$/g, '')
|
const slug = pathname === '/' ? 'home' : pathname.replace(/^\/|\/$/g, '')
|
||||||
|
console.log('Slug:', slug)
|
||||||
---
|
---
|
||||||
|
|
||||||
<footer class='mx-auto mt-24 w-full'>
|
<footer class='mx-auto mt-24 w-full'>
|
||||||
|
Reference in New Issue
Block a user