diff --git a/.jules/spider.md b/.jules/spider.md index 572ac48..94d1fdf 100644 --- a/.jules/spider.md +++ b/.jules/spider.md @@ -10,3 +10,6 @@ ## 2024-05-19 - Typechecking JSON-LD Date Properties **Learning:** When passing potentially null date fields (like `publishedAt`, `updatedAt`) from Payload CMS to jsonLd generator functions, using the fields directly can cause strict TypeScript compilation failures since the schemas explicitly expect `string | undefined` and not `null`. **Action:** Always use the logical OR operator with `undefined` (e.g., `datePublished: post.publishedAt || undefined`) when passing date properties to JSON-LD generator functions to satisfy strict type requirements and prevent build regressions. +## 2026-06-22 - Nested Main Tags in Page Layouts +**Learning:** Detailed page layouts (like `actualites/[slug]/page.tsx`) often define `
` as their outermost wrapper. If inner column structures also use `
`, it results in invalid HTML5 (nested `
` tags). This negatively impacts semantic structure and crawler readability. +**Action:** When working on page components, always verify the outermost wrapper tag before using `
` for inner content areas. Use semantic `
` elements for structural grid/column wrappers if a `
` or `
` wrapper already exists at a higher level. diff --git a/src/app/(frontend)/[locale]/actualites/[slug]/page.tsx b/src/app/(frontend)/[locale]/actualites/[slug]/page.tsx index e4026ac..c7fa3dc 100644 --- a/src/app/(frontend)/[locale]/actualites/[slug]/page.tsx +++ b/src/app/(frontend)/[locale]/actualites/[slug]/page.tsx @@ -156,7 +156,8 @@ export default async function Actualite({ params: paramsPromise }: Args) { {/* CENTER COLUMN: Main Article (Left aligned flow) */} -
+ {/* SEO: Changed
to
to prevent invalid nested
tags, improving semantic structure and crawlability. */} +
{/* Hero Image */} @@ -254,7 +255,7 @@ export default async function Actualite({ params: paramsPromise }: Args) {
-
+
{/* RIGHT COLUMN: Related / Latest News */}