fix(seo): move headTags to config root so site-wide JSON-LD actually renders#889
Open
nehagup wants to merge 1 commit into
Open
fix(seo): move headTags to config root so site-wide JSON-LD actually renders#889nehagup wants to merge 1 commit into
nehagup wants to merge 1 commit into
Conversation
…renders headTags was nested under `themeConfig`, but Docusaurus only reads a root-level `headTags` field — so the entire array was silently ignored and NEVER rendered: the Organization, SoftwareApplication, and WebSite JSON-LD (added in #819) plus the Google Fonts preconnect/stylesheet links. Verified against production: live /docs/* pages contained none of these head tags. Moving the identical array to the config root makes Docusaurus emit them. No content change — the 3 JSON-LD blocks and font links are unchanged, only relocated. This also unblocks #887 (Organization sameAs completion), which edits this same block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Neha Gupta <gneha21@yahoo.in>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a Docusaurus configuration issue where site-wide <head> tags were previously nested under themeConfig and therefore not rendered. It relocates the existing headTags array to the root config so JSON-LD schemas and font preconnect/stylesheet links are actually emitted across the docs site.
Changes:
- Move the
headTagsarray fromthemeConfigto the config root. - Restore rendering of site-wide JSON-LD (
SoftwareApplication,Organization,WebSite) in the built<head>. - Restore Google Fonts preconnect + stylesheet links that were previously ignored.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The bug
headTagswas nested underthemeConfig, but Docusaurus only reads a root-levelheadTagsfield. So the entire array was silently ignored and never rendered: theOrganization,SoftwareApplication, andWebSiteJSON-LD (added in #819) plus the Google Fontspreconnect/stylesheet links.Verified against production: live
/docs/*pages contained none of these head tags (no Organization schema, no font preconnects).The fix
Move the identical
headTagsarray to the config root. No content change — the 3 JSON-LD blocks and font links are byte-for-byte the same, only relocated (diff is 143 moved / 143 removed).Impact
sameAscompletion), which edits this same block.Verify
node --checkpasses; prettier clean;deploy-previewCI will confirm the tags render in the built<head>.seo/audit-fixesconfig.js edits — sequence merges accordingly.🤖 Generated with Claude Code