Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .jules/spider.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
## 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.

## 2024-05-18 - [Fix Semantic HTML] **Learning:** Do not commit temporary modification scripts to the repository. **Action:** Make sure to delete any script used for text replacement or automated changes before committing and completing pre-commit steps.
7 changes: 4 additions & 3 deletions src/app/(frontend)/[locale]/actualites/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export default async function Actualite({ params: paramsPromise }: Args) {


return (
<main className="bg-smatch-black min-h-screen text-smatch-text-primary selection:bg-smatch-gold selection:text-smatch-black pb-32 pt-32">
{/* SEO: Use semantic <main> tag to indicate the primary content of the document, improving crawlability and accessibility. */}
<div className="bg-smatch-black min-h-screen text-smatch-text-primary selection:bg-smatch-gold selection:text-smatch-black pb-32 pt-32">
{/* Page Layout Wrapper */}
{/* Search Engine Optimization Structured Data */}
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(breadcrumbJsonLd) }} />
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(articleJsonLd) }} />
Expand Down Expand Up @@ -156,6 +156,7 @@ export default async function Actualite({ params: paramsPromise }: Args) {
</aside>

{/* CENTER COLUMN: Main Article (Left aligned flow) */}
{/* SEO: Use semantic <main> tag to indicate the primary content of the document, improving crawlability and accessibility. */}
<main className="col-span-1 lg:col-span-7">
<article className="w-full">

Expand Down Expand Up @@ -294,7 +295,7 @@ export default async function Actualite({ params: paramsPromise }: Args) {
</aside>

</div>
</main>
</div>
)
}

Expand Down