Skip to content

docs: keep the sandboxes of the examples out of search results - #1389

Draft
dangreen wants to merge 1 commit into
docs/donut-chartfrom
docs/noindex-sandboxes
Draft

dangreen wants to merge 1 commit into
docs/donut-chartfrom
docs/noindex-sandboxes

Conversation

@dangreen

@dangreen dangreen commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Changes

The example pages show their sandboxes in an iframe, and Google indexed the sandboxes, such as /sandboxes/doughnut/default/, as separate pages: a chart without a title or text. The example page that embeds a sandbox is the page that should show up in search.

scripts/sandboxes.js copies the built sandboxes into public/sandboxes. It now adds to the index.html of each copy:

  • <meta name="robots" content="noindex" />;
  • a <title>, such as "Preview of the doughnut/default example", when the page has none.

The sandboxes in the repository stay as they are, and StackBlitz opens them from there. The script throws if a page has no </head>, so that a sandbox cannot lose the tag unnoticed.

Checked locally

  • Each of the 17 sandbox pages in the build has one robots meta tag and one title.
  • robots.txt allows /sandboxes/, so Google can read the tag, and the sitemap lists no sandboxes.
  • The website builds with 0 errors with the whole stack, and oxlint passes.
  • The squash message passes commitlint.

Stack

  1. docs: explain how to type the options of a custom plugin #1387
  2. docs: call the doughnut chart a donut chart too #1388
  3. docs: keep the sandboxes of the examples out of search results #1389 ← this PR

Merge in this order. When a PR is merged, GitHub retargets the next one to master: rebase it onto master before merging, so that it carries only its own commit.

🤖 Generated with Claude Code

Google indexed the sandboxes as separate pages: charts without a title or text. Their copies on
the website now have a title and a robots meta tag with noindex. StackBlitz still opens them
from the repository unchanged.
@codecov

codecov Bot commented Dec 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.97%. Comparing base (8857823) to head (3fbd97d).

Additional details and impacted files
@@                Coverage Diff                @@
##           docs/donut-chart    #1389   +/-   ##
=================================================
  Coverage             93.97%   93.97%           
=================================================
  Files                     3        3           
  Lines                    83       83           
  Branches                 20       20           
=================================================
  Hits                     78       78           
  Misses                    3        3           
  Partials                  2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

1 participant