Remove unused webPageJsonLd options - #226
Merged
Merged
Conversation
No caller ever passed them, so the home-breadcrumb and default OG image paths were the only ones in use. Co-authored-by: Cursor <cursoragent@cursor.com>
anonrig
approved these changes
Sep 4, 2026
There was a problem hiding this comment.
🟢 Approval recommended
All in-repo webPageJsonLd call sites were verified to never pass breadcrumbs or image, so the change is a safe surface-area reduction with no functional impact.
Pull request overview
This PR simplifies the site’s JSON-LD helper API by removing webPageJsonLd options (breadcrumbs, image) that are not used anywhere in this repository, and by always using the existing defaults (home → page title breadcrumbs, and the site OG image). This reduces unused surface area in src/lib/schema.ts while keeping emitted JSON-LD stable for existing call sites.
Changes:
- Removed unused
breadcrumbsandimageoptions fromwebPageJsonLd’s options type. - Inlined default breadcrumb construction via
pageBreadcrumbs(options.title, options.path). - Inlined default
primaryImageOfPageto${websiteUrl}/opengraph-image.png.
File summaries
| File | Description |
|---|---|
| src/lib/schema.ts | Removes unused webPageJsonLd option fields and hardwires the existing default breadcrumbs + OG image. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
type: chore
intent: Drop optional webPageJsonLd fields that no caller ever provides
app-source-changed: true
constraints: typescript@6
verify:
preview:
Hey — I'm working on an experimental CLI that uses the tsgo toolchain to find optional component and function signatures that are never passed in practice. Dead-code elimination, complementary to something like knip.
webPageJsonLdaccepted optionalbreadcrumbsandimage, but every call site (about, contact, newsletter, press) omitted both and relied on the defaults: home → page title breadcrumbs, and the site OG image. This PR removes those options and inlines the defaults.JSON-LD output is unchanged. Blog posts, tags, and series still build their own breadcrumb lists via
blogPostingJsonLd/tagCollectionJsonLd/seriesCollectionJsonLd.I'm opening this to help clear dead surface, and also to get feedback on the detector. False positives are always possible.
Some other PRs from the same loop:
✅ Sentry (4k loc removed)
⏳ Tanstack
⏳ Grafana
⏳ Cal.com
Would love to hear your feedback.
Summary
breadcrumbsandimagefromwebPageJsonLdpageBreadcrumbs(title, path)and the default OG imageNon-goals
Pagebreadcrumbs (those are still passed)Test plan
node --run lintnode --run testnode --run build/about,/contact,/newsletter,/pressJSON-LD: breadcrumb list is Home → page title,primaryImageOfPageis the site OG imageMade with Cursor