Skip to content

Commit e102275

Browse files
aborrusoclaude
andcommitted
website: enforce trailing slash on canonical URL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e2edca9 commit e102275

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

website/src/layouts/Layout.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const {
1515
1616
const siteUrl = 'https://ondata.github.io';
1717
const baseUrl = '/ckan-mcp-server';
18-
const canonicalURL = new URL(Astro.url.pathname, siteUrl + baseUrl);
18+
const rawPath = Astro.url.pathname.endsWith('/') ? Astro.url.pathname : Astro.url.pathname + '/';
19+
const canonicalURL = new URL(rawPath, siteUrl + baseUrl);
1920
---
2021

2122
<!DOCTYPE html>

0 commit comments

Comments
 (0)