Repository navigation
docs: rank Self-hosted pages lower in search and label them - #2823
Merged
Merged
Conversation
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>
Contributor
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
Contributor
There was a problem hiding this comment.
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.pycomplexity 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.boostis 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
DMarinhoCodacy
approved these changes
Nov 10, 2026
This branch was previously deployed
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.
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.pysetssearch.boost: 0.5on every page underchart/. A page can still set its own boost.header.cssadds a Self-hosted chip to search results that link tochart/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 --strictpasses; checked in light and dark mode and at 375px. Same results on the branch preview.Before / after: "slack integration"
Chip at 375px, searching "license":
🤖 Generated with Claude Code