seo: enforce trailing slash on all URLs
- 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:
@@ -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 },
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user