Skip to content

docs: rank Self-hosted pages lower in search and label them - #2823

Merged
claudiacodacy merged 2 commits into
masterfrom
docs-search-demote-self-hosted
Nov 10, 2026
Merged

claudiacodacy merged 2 commits into
masterfrom
docs-search-demote-self-hosted

Conversation

@claudiacodacy

@claudiacodacy claudiacodacy commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Self-hosted pages often share a Cloud page's title, so they can outrank the page most readers need. Searching "slack integration" returned the Self-hosted page first.

  • theme/hooks/search_boost.py sets search.boost: 0.5 on every page under chart/. A page can still set its own boost.
  • One CSS rule in header.css adds a Self-hosted chip to search results that link to chart/ pages.

Slack, Jira and GitHub Enterprise searches now return the Cloud page first. Where a Self-hosted page still ranks first ("license", "quality settings"), the chip marks it. mkdocs build --strict passes; checked in light and dark mode and at 375px. Same results on the branch preview.

Before / after: "slack integration"

Before After
Before: the Self-hosted Slack integration page is the first result After: the Cloud page is first and the Self-hosted page has a chip

Chip at 375px, searching "license":

Self-hosted chip on a search result at phone width

🤖 Generated with Claude Code

Self-hosted pages often share a Cloud page's title, so searching
"slack integration" put the Self-hosted page first. A build hook now
sets search.boost 0.5 on every page under chart/, and a CSS rule adds
a "Self-hosted" chip to search results that link to chart/ pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claudiacodacy
claudiacodacy requested a review from a team as a code owner November 10, 2026 16:26
@github-actions
github-actions Bot temporarily deployed to Netlify November 10, 2026 16:27 Inactive
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

✅ No blocking issues noticed

No blocking findings were identified.

Codacy also found:

  • No static-analysis or duplication issues.
  • theme/hooks/search_boost.py complexity increased by 3; coverage metrics are unavailable.

Test suggestions

  • Verify pages under chart/ receive the default boost and non-Self-hosted pages are unchanged.
  • Verify an existing page-specific search.boost is not overwritten.
  • Verify search results for /chart/ links display the Self-hosted chip, while other results do not.
  • Verify representative searches place the Cloud result before the corresponding Self-hosted result.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify pages under `chart/` receive the default boost and non-Self-hosted pages are unchanged.
2. Verify an existing page-specific `search.boost` is not overwritten.
3. Verify search results for `/chart/` links display the Self-hosted chip, while other results do not.
4. Verify representative searches place the Cloud result before the corresponding Self-hosted result.

Make this review better

TIP Add a ticket key to the branch or title so the reviewer can check the PR against it. Or tell us which ticket tracker you use here.

TIP How was this review? Give us feedback

@claudiacodacy
claudiacodacy enabled auto-merge (squash) November 10, 2026 21:28
@github-actions
github-actions Bot temporarily deployed to Netlify November 10, 2026 21:30 Inactive
@claudiacodacy
claudiacodacy merged commit 9b9c76a into master Nov 10, 2026
5 checks passed
@claudiacodacy
claudiacodacy deleted the docs-search-demote-self-hosted branch November 10, 2026 21:30

This branch was previously deployed

1 inactive deployment
Netlify — 2a5d6261 Deployed Nov 10, 2026 by github-actions[bot]
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