Skip to content

Commit d76a877

Browse files
committed
canonical urls
1 parent dd047e3 commit d76a877

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

website/src/layouts/Layout.astro

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
const { frontmatter } = Astro.props || {}
33
const { title } = frontmatter || Astro.props
4+
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
45
56
import '../styles/_style.css'
67
---
@@ -26,6 +27,7 @@ import '../styles/_style.css'
2627

2728
<link href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
2829
<link rel="sitemap" href="/sitemap-index.xml" />
30+
<link rel="canonical" href={canonicalURL} />
2931
</head>
3032

3133
<body>

0 commit comments

Comments
 (0)