We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0739973 commit 3161c02Copy full SHA for 3161c02
usehooks.com/src/layouts/Layout.astro
@@ -11,8 +11,14 @@ const {
11
title,
12
description,
13
ogImage = new URL("/meta/og.jpg", Astro.url),
14
- url = new URL(Astro.url.pathname, Astro.site),
15
} = Astro.props;
+
16
+const pathname = Astro.url.pathname
17
18
+const url = pathname[pathname.length - 1] === "/"
19
+ ? new URL(pathname.slice(0, pathname.length -1), Astro.site)
20
+ : new URL(Astro.url.pathname, Astro.site)
21
22
---
23
24
<!DOCTYPE html>
0 commit comments