diff --git a/templates/website/src/app/(frontend)/[slug]/page.tsx b/templates/website/src/app/(frontend)/[slug]/page.tsx
index 1aa61e20451..8ab6ec717b1 100644
--- a/templates/website/src/app/(frontend)/[slug]/page.tsx
+++ b/templates/website/src/app/(frontend)/[slug]/page.tsx
@@ -13,6 +13,7 @@ import { RenderBlocks } from '@/blocks/RenderBlocks'
import { RenderHero } from '@/heros/RenderHero'
import { generateMeta } from '@/utilities/generateMeta'
import PageClient from './page.client'
+import { LivePreviewListener } from '@/components/LivePreviewListener'
export async function generateStaticParams() {
const payload = await getPayload({ config: configPromise })
@@ -71,6 +72,8 @@ export default async function Page({ params: paramsPromise }: Args) {
{/* Allows redirects for valid pages too */}
+
+
diff --git a/templates/website/src/app/(frontend)/layout.tsx b/templates/website/src/app/(frontend)/layout.tsx
index 4f3e964e4e6..8c1e69b19fa 100644
--- a/templates/website/src/app/(frontend)/layout.tsx
+++ b/templates/website/src/app/(frontend)/layout.tsx
@@ -8,7 +8,6 @@ import React from 'react'
import { AdminBar } from '@/components/AdminBar'
import { Footer } from '@/Footer/Component'
import { Header } from '@/Header/Component'
-import { LivePreviewListener } from '@/components/LivePreviewListener'
import { Providers } from '@/providers'
import { InitTheme } from '@/providers/Theme/InitTheme'
import { mergeOpenGraph } from '@/utilities/mergeOpenGraph'
@@ -34,7 +33,6 @@ export default async function RootLayout({ children }: { children: React.ReactNo
preview: isEnabled,
}}
/>
-
{children}
diff --git a/templates/website/src/app/(frontend)/posts/[slug]/page.tsx b/templates/website/src/app/(frontend)/posts/[slug]/page.tsx
index ec25be6f5b3..63f805713be 100644
--- a/templates/website/src/app/(frontend)/posts/[slug]/page.tsx
+++ b/templates/website/src/app/(frontend)/posts/[slug]/page.tsx
@@ -13,6 +13,7 @@ import type { Post } from '@/payload-types'
import { PostHero } from '@/heros/PostHero'
import { generateMeta } from '@/utilities/generateMeta'
import PageClient from './page.client'
+import { LivePreviewListener } from '@/components/LivePreviewListener'
export async function generateStaticParams() {
const payload = await getPayload({ config: configPromise })
@@ -54,6 +55,8 @@ export default async function Post({ params: paramsPromise }: Args) {
{/* Allows redirects for valid pages too */}
+
+
diff --git a/templates/website/src/components/PayloadRedirects/index.tsx b/templates/website/src/components/PayloadRedirects/index.tsx
index 2e94fdde884..d2397716e35 100644
--- a/templates/website/src/components/PayloadRedirects/index.tsx
+++ b/templates/website/src/components/PayloadRedirects/index.tsx
@@ -12,11 +12,9 @@ interface Props {
/* This component helps us with SSR based dynamic redirects */
export const PayloadRedirects: React.FC
= async ({ disableNotFound, url }) => {
- const slug = url.startsWith('/') ? url : `${url}`
-
const redirects = await getCachedRedirects()()
- const redirectItem = redirects.find((redirect) => redirect.from === slug)
+ const redirectItem = redirects.find((redirect) => redirect.from === url)
if (redirectItem) {
if (redirectItem.to?.url) {