seo: enforce trailing slash on all URLs
Deploy / verify (push) Successful in 37s
Deploy / deploy (push) Successful in 55s

- Set trailingSlash='always' globally via root layout.
- Update postHref, pageHref, Pagination, tag/breadcrumb hrefs, blog→posts
  redirects to emit trailing slash.
- Match old Astro canonical so indexed URLs hit 200 directly instead of
  308-redirect.
This commit is contained in:
Peter Meier
2026-04-17 22:23:16 +02:00
parent d28a55a70a
commit f328989aa8
12 changed files with 24 additions and 19 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ export const load: PageServerLoad = async ({ params, locals, url }) => {
socialImage: postImageUrl ?? undefined,
breadcrumbItems: [
{ href: '/', label: 'Start' },
{ href: '/posts', label: 'Beiträge' },
{ href: '/posts/', label: 'Beiträge' },
{ label: post.headline ?? post.linkName ?? post.slug ?? post._slug ?? slug },
],
};