Skip to content

Refactor schema.org markup and move person identity to home page#42

Merged
dinooo13 merged 2 commits into
mainfrom
claude/fix-structured-data-production-3YdfZ
May 9, 2026
Merged

Refactor schema.org markup and move person identity to home page#42
dinooo13 merged 2 commits into
mainfrom
claude/fix-structured-data-production-3YdfZ

Conversation

@dinooo13
Copy link
Copy Markdown
Owner

@dinooo13 dinooo13 commented May 9, 2026

Summary

Restructured schema.org markup organization by moving person identity definition from the root app component to the home page, and updated the unhead dependency constraint to prevent version splitting issues.

Key Changes

  • Removed person schema from app.vue: Deleted definePerson() schema definition and associated profileImageUrl computation from the root component
  • Added ProfilePage schema to home page: Implemented defineWebPage() with ProfilePage type on the index page, including dateCreated, dateModified, and mainEntity reference to the person identity
  • Updated nuxt.config.ts: Added description field to the identity configuration with expanded details about role and responsibilities
  • Fixed unhead dependency constraint: Changed unhead@<2.1.13 override from >=2.1.13 to >=2.1.13 <3 to prevent version splitting between @unhead/vue (v3) and @unhead/schema-org (v2), which was causing empty JSON-LD output on prerender
  • Updated documentation: Clarified the unhead override rationale in CLAUDE.md

Implementation Details

The person identity is now defined in nuxt.config.ts and referenced from the home page via schema.org's mainEntity property, creating a cleaner separation of concerns where the home page acts as the ProfilePage that describes the person entity. The unhead constraint ensures both head registry consumers use the same major version, maintaining proper JSON-LD generation during prerendering.

https://claude.ai/code/session_015bxsd4W7qsVxKBM4BZDjCe

claude added 2 commits May 9, 2026 20:35
The pnpm.overrides rule `unhead@<2.1.13: '>=2.1.13'` had no upper bound,
so `@unhead/vue@2.1.12`'s `unhead@2.1.12` dep got resolved up to 3.1.0,
while `@unhead/schema-org@2.1.13` (locked to `unhead@2.1.13`) stayed on v2.
The split unhead instances meant the schema-org plugin (registered into v2)
never saw the JSON-LD script tag (registered via useHead into v3), so the
prerendered `<script type="application/ld+json">` shipped with an empty body.

Adding the `<3` upper bound deduplicates `unhead` to 2.1.13 and lets the
schema-org plugin populate the graph during prerender.

https://claude.ai/code/session_015bxsd4W7qsVxKBM4BZDjCe
Qualifies / for Google's Profile Page rich result by setting
@type: [WebPage, ProfilePage] with mainEntity pointing at the Person
identity, plus the recommended dateCreated and dateModified.

Consolidates the Person definition into schemaOrg.identity in
nuxt.config.ts (adds a description byline) and removes the duplicate
definePerson() from app.vue, which was producing duplicate sameAs
entries in the graph.

https://claude.ai/code/session_015bxsd4W7qsVxKBM4BZDjCe
@dinooo13 dinooo13 merged commit 70d2cc3 into main May 9, 2026
8 checks passed
@dinooo13 dinooo13 deleted the claude/fix-structured-data-production-3YdfZ branch May 9, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants