Skip to content

Give each page its own title, description and canonical - #986

Merged
JonasHelming merged 1 commit into
masterfrom
theia-website-page-heads
Oct 12, 2026
Merged

JonasHelming merged 1 commit into
masterfrom
theia-website-page-heads

Conversation

@JonasHelming

Copy link
Copy Markdown
Contributor

Six pages shipped byte-identical titles and meta descriptions and emitted no canonical link at all:

Page Title before Canonical before
/theia-platform/ Theia Platform – Open, Flexible, and Extensible… none
/blogs/ Theia Platform – Open, Flexible, and Extensible… none
/releases/ Theia Platform – Open, Flexible, and Extensible… none
/resources/ Theia Platform – Open, Flexible, and Extensible… none
/support/ Theia Platform – Open, Flexible, and Extensible… none
/docs/ Theia Platform – Open, Flexible, and Extensible… none

Cause

export const Head = BaseHead (and = HeadWithPlatformSchema on the Platform page) passes Gatsby's page props — data, pageContext, location — so canonical, title and description all arrive undefined and fall back to the sitewide defaults. Because those defaults are Theia Platform copy, five unrelated pages presented themselves as the Platform page.

The effect isn't limited to those five. Six identical candidates with no canonical dilute the Platform page itself, which ends up competing against the blog index for its own terms.

Changes

  • Each of the six pages now has its own Head with a title, a meta description and a self-canonical.
  • headwithPlatformschema.js — JSON-LD url pointed at https://theia-ide.org/ (the homepage, which is the Theia IDE); now /theia-platform/.
  • gatsby-config.js — sitewide defaults made neutral, so a new page that forgets its Head no longer inherits Platform copy. Comment added explaining the fallback's role.

Verified with gatsby build: six distinct titles, six distinct descriptions, correct self-canonicals on all six.

Follow-up, not addressed here

<Layout canonical='/'> appears on most pages but layout.js never reads the prop — it does nothing. That's largely how this went unnoticed: every page looks like it sets a canonical. Left alone to keep this diff focused; worth removing separately.

Six pages shared the sitewide default title and meta description and
emitted no canonical, because `export const Head = BaseHead` receives
Gatsby's page props rather than the expected values. Since the default
was Theia Platform copy, /blogs/, /releases/, /resources/, /support/
and /docs/ all presented themselves as the Platform page.

Also points the Theia Platform JSON-LD url at /theia-platform/ instead
of the homepage, and makes the sitewide fallback neutral.
@JonasHelming
JonasHelming requested review from ndoschek and a balanced review from Copilot and removed request for Copilot October 10, 2026 20:43
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-12 09:41 UTC

@ndoschek ndoschek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM, the pages have their own title, description and self-canonical 👍

@JonasHelming
JonasHelming merged commit 0fe6bed into master Oct 12, 2026
2 of 3 checks passed
@JonasHelming
JonasHelming deleted the theia-website-page-heads branch October 12, 2026 09:41
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