close
Skip to content

docs: add canonical links and Organization JSON-LD to both sites - #509

Merged
Prashant-Surya merged 1 commit into
masterfrom
docs/organization-jsonld-canonical
Aug 22, 2026
Merged

docs: add canonical links and Organization JSON-LD to both sites#509
Prashant-Surya merged 1 commit into
masterfrom
docs/organization-jsonld-canonical

Conversation

@vihar

@vihar vihar commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Item 2 from the is-agentic scan of docs.plane.so (follow-up to #508, independent of it).

docs.plane.so had no <link rel="canonical"> (developers.plane.so already injected one per page), and neither site published structured data. The scan flagged three findings for this: Metadata completeness (partial), JSON-LD structured data (fail), Organization schema completeness (fail).

Change. New packages/theme/src/seo.ts, exported as @plane/docs-theme/seo (build-time only — nothing ships to the browser):

  • siteJsonLd(site) → one <script type="application/ld+json"> head entry with a shared Organization for Plane (name, url, logo, sameAs GitHub + X, contactPoint for support@ and sales@) plus a WebSite node for the specific site. Keeping the Organization in the theme means both sites publish the same identity and it can't drift.
  • canonicalLink(origin, pageData) → per-page canonical mirroring cleanUrls (dir/page.md/dir/page, index.md/), skipped when frontmatter already sets one.

apps/docs gains a transformPageData for the canonical; apps/developer-docs swaps its inline canonical logic for the helper. Both add siteJsonLd(...) to head.

No postal address is included — say if one should be published.

Verification

  • pnpm check:types / check:format pass; both apps build.
  • Rendered output checked in both dist/s: exactly one canonical and one JSON-LD per page; root canonical is https://docs.plane.so/, nested pages have no trailing slash, and /self-hosting/manage/upgrade-from-0.13.2-0.14.0 is correct. The JSON-LD parses (Organization Plane + WebSite …, 2 contact points).
  • After deploy: https://validator.schema.org/ on either homepage, or
    curl -s https://docs.plane.so/ | grep -oE '<link rel="canonical"[^>]*>|application/ld\+json'
    

Checklist

🤖 Generated with Claude Code

https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8

docs.plane.so had no <link rel="canonical"> and neither site published
structured data, which the is-agentic scan flagged (metadata completeness,
JSON-LD, Organization schema).

Add `packages/theme/src/seo.ts`, exported as `@plane/docs-theme/seo`, with:

- `siteJsonLd(site)` — one `application/ld+json` head entry carrying a
  shared Plane Organization (logo, GitHub/X profiles, support and sales
  contact points) plus a WebSite node for the site, so both sites publish
  the same identity
- `canonicalLink(origin, pageData)` — per-page canonical mirroring cleanUrls,
  skipped when frontmatter already sets one

Wire both into `apps/docs` (new `transformPageData`) and `apps/developer-docs`
(replacing its inline canonical logic).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8
@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
Image developer-docs Ready Ready Preview Aug 21, 2026 8:06pm
Image docs Ready Ready Preview Aug 21, 2026 8:06pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@vihar, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a28b499-7ef4-4b9a-8340-33acd028de08

📥 Commits

Reviewing files that changed from the base of the PR and between aad24bb and 025844c.

📒 Files selected for processing (5)
  • apps/developer-docs/docs/.vitepress/config.mts
  • apps/docs/docs/.vitepress/config.ts
  • packages/theme/README.md
  • packages/theme/package.json
  • packages/theme/src/seo.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Prashant-Surya
Prashant-Surya merged commit c737d03 into master Aug 22, 2026
6 checks passed
@Prashant-Surya
Prashant-Surya deleted the docs/organization-jsonld-canonical branch August 22, 2026 11:35
vihar added a commit that referenced this pull request Aug 22, 2026
With #509 merged, not-found.md picked up a canonical pointing at /not-found, a
URL that only exists to become 404.html. Add a `canonical: false` frontmatter
opt-out to canonicalLink() and use it there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8
Prashant-Surya pushed a commit that referenced this pull request Aug 22, 2026
* docs: server-render a useful 404 page on both sites

Unknown paths on docs.plane.so and developers.plane.so returned a 404 whose
body was an empty app shell (VitePress deliberately leaves #app empty in the
404.html it writes), so agents and no-JS clients got nothing to recover from.

- packages/theme: new NotFound.vue with the "page not found" content — home,
  search, sitemap.xml, llms.txt, llms-full.txt, the sibling Plane docs site,
  a help link, and a hint for agents (append .md / Accept: text/markdown).
  Registered as <PlaneNotFound> and used as the Layout's default `not-found`
  slot so client-side navigation to a missing page shows the same content.
  Site-specific wording comes from a new `notFound` option on
  createPlaneTheme.
- apps/*: docs/not-found.md renders the component; buildEnd moves the
  server-rendered not-found.html over 404.html and drops the stray copies.
  The page is noindex, excluded from search, llms.txt and the sitemap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8

* docs: no canonical on the 404 page

With #509 merged, not-found.md picked up a canonical pointing at /not-found, a
URL that only exists to become 404.html. Add a `canonical: false` frontmatter
opt-out to canonicalLink() and use it there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CsPSwTnpsEb5c5Ud2CLrL8

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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