Conversation
…cleStructuredData component
…ages for improved SEO
📝 WalkthroughWalkthroughThis pull request integrates JSON-LD structured data throughout the application by adding breadcrumb navigation data to multiple layouts and pages, enabling the FAQ section with schema markup, introducing new structured data components for FAQ pages and software applications, and updating schema types in existing components from AboutPage to ProfilePage and Article to BlogPosting. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src/components/about-structured-data.tsx (1)
21-22:dateModifiedcomputed at render time may not reflect actual content changes.Using
new Date()meansdateModifiedwill be the build timestamp (for SSG) or request time (for SSR), not the actual last modification date of the about page content. For accurate SEO metadata, consider:
- Using a fixed date that you update manually when content changes, or
- Deriving it from git commit dates or CMS metadata at build time.
Additionally, if this component renders on both server and client, there's a minor hydration mismatch risk if the date changes between server render and client hydration (though splitting at
'T'makes this unlikely within the same day).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/about-structured-data.tsx` around lines 21 - 22, The dateModified field is computed at render time which can be incorrect or cause hydration drift; update the AboutStructuredData component to accept a fixed lastModified value (e.g., a prop named lastModified or a build-time constant like COMMIT_DATE/GIT_LAST_MODIFIED) and use that instead of new Date().toISOString().split('T')[0]; alternatively derive the date at build time in getStaticProps or from your CMS/git metadata and pass it into AboutStructuredData so dateModified reflects the actual content change date.src/components/data-structured/software-application.tsx (1)
50-54: Consider aligning publisher with the author/creator entity reference.The
authorandcreatorboth reference${NEXT_PUBLIC_APP_URL}#person, butpublisheris defined as a separate Person without an@id. If the publisher is the same person, consider using the same reference for linked data consistency:♻️ Suggested alignment
"publisher": { "@type": "Person", + "@id": `${NEXT_PUBLIC_APP_URL}#person`, - "name": appName, + "name": PERSON_NAME, "url": NEXT_PUBLIC_APP_URL },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/data-structured/software-application.tsx` around lines 50 - 54, The publisher object currently creates a separate Person while author and creator reference `${NEXT_PUBLIC_APP_URL}#person`; update the publisher entry in the structured data to reuse that same reference (e.g., set publisher to reference the same "@id": `${NEXT_PUBLIC_APP_URL}#person` or assign the existing author/creator object) so all three (author, creator, publisher) consistently point to the same linked entity; locate the publisher object in software-application.tsx and replace its Person literal with the shared `@id` reference (keeping appName/NEXT_PUBLIC_APP_URL values).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/app/`(home)/sections/home-faq.tsx:
- Line 25: Update the FAQ item's description prop to correct the grammar:
replace the current string "Everything about this projects." with a
grammatically correct phrasing such as "Everything about this project." in the
description prop (the description= attribute in the home-faq.tsx component).
In `@src/app/posts/layout.tsx`:
- Around line 21-24: The layout currently emits a BreadcrumbStructuredData block
causing duplicate JSON-LD on /posts/[slug] because the post detail page
([slug]/page.tsx) also renders BreadcrumbStructuredData; remove the
BreadcrumbStructuredData invocation from the posts layout (the JSX block that
calls BreadcrumbStructuredData with items [{ name: 'Home'... }, { name:
'Posts'... }]) so only the post detail page's BreadcrumbStructuredData (in
[slug]/page.tsx) emits breadcrumb schema, or alternatively guard the layout call
to render only for the posts index (e.g., when no slug param) so
BreadcrumbStructuredData is not rendered alongside the post detail component.
---
Nitpick comments:
In `@src/components/about-structured-data.tsx`:
- Around line 21-22: The dateModified field is computed at render time which can
be incorrect or cause hydration drift; update the AboutStructuredData component
to accept a fixed lastModified value (e.g., a prop named lastModified or a
build-time constant like COMMIT_DATE/GIT_LAST_MODIFIED) and use that instead of
new Date().toISOString().split('T')[0]; alternatively derive the date at build
time in getStaticProps or from your CMS/git metadata and pass it into
AboutStructuredData so dateModified reflects the actual content change date.
In `@src/components/data-structured/software-application.tsx`:
- Around line 50-54: The publisher object currently creates a separate Person
while author and creator reference `${NEXT_PUBLIC_APP_URL}#person`; update the
publisher entry in the structured data to reuse that same reference (e.g., set
publisher to reference the same "@id": `${NEXT_PUBLIC_APP_URL}#person` or assign
the existing author/creator object) so all three (author, creator, publisher)
consistently point to the same linked entity; locate the publisher object in
software-application.tsx and replace its Person literal with the shared `@id`
reference (keeping appName/NEXT_PUBLIC_APP_URL values).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 80284e57-ff86-4953-9c55-c52719424add
📒 Files selected for processing (10)
src/app/(home)/page.tsxsrc/app/(home)/sections/home-faq.tsxsrc/app/about/page.tsxsrc/app/posts/[slug]/page.tsxsrc/app/posts/layout.tsxsrc/app/projects/layout.tsxsrc/components/about-structured-data.tsxsrc/components/data-structured/article.tsxsrc/components/data-structured/faq-page.tsxsrc/components/data-structured/software-application.tsx
This pull request adds and improves structured data (Schema.org) across several pages to enhance SEO and search engine understanding. The most important changes include adding breadcrumb structured data to key layouts and pages, introducing structured data for FAQ and software application pages, and refining existing structured data types for better accuracy.
Structured Data Enhancements:
BreadcrumbStructuredDatacomponents to the About, Posts, and Projects pages and layouts, providing search engines with hierarchical navigation information. [1] [2] src/app/posts/[slug]/page.tsxR17, src/app/posts/[slug]/page.tsxR115-R119, [3] [4] [5]FAQPageStructuredDatato the Home FAQ section, generating FAQPage schema markup for frequently asked questions. [1] [2] [3]SoftwareApplicationStructuredDatacomponent to provide Schema.org markup for software applications, supporting fields like screenshots, repository URL, and keywords.Schema Type Improvements:
AboutPagetoProfilePageand added more descriptive fields, including@id,name,description,url,dateCreated, anddateModified. [1] [2]ArticletoBlogPostingfor more accurate representation.Component Integration:
BlurFadeanimation for consistent UI/UX.Summary by CodeRabbit
New Features
Improvements