[quality] site search indexes only the blog: docsRouteBasePath default does not match docs routeBasePath
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 90/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
Direzione di ricerca
Inizia da docusaurus.config.js:242 e confronta le opzioni del plugin di ricerca con presets.docs.routeBasePath. Esegui npm run build:production ed esamina build/search-index.json per confermare che le pagine della documentazione siano indicizzate. Poi aggiorna tests/e2e/search.spec.js per ripristinare l’assertion sul documento non appartenente al blog e la relativa nota esplicativa; il lavoro è completato quando l’indice di produzione include la documentazione e il test end-to-end supera.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Discovered while building end-to-end coverage for /search. This is a live search
defect, not a test gap.
Finding
docusaurus.config.js serves the docs at the site root:
docs: {
routeBasePath: "/", // Serve the docs at the site root
but registers the local search plugin with no options:
plugins: [require.resolve("docusaurus-plugin-search-local")],
The plugin defaults to docsRouteBasePath: ["docs"]
(node_modules/docusaurus-plugin-search-local/lib/server/options.js:10). No route on this
site begins with /docs, so no docs page is indexed at all. Site search silently
returns blog posts only.
Measured on a clean production build at 26946ba
$ npm run build:production
$ node -e "const j=require(\"./build/search-index.json\");
const d=j.flatMap(e=>e.documents||[]);
console.log(d.length, [...new Set(d.map(x=>\"/\"+x.u.split(\"/\")[1]))]);"
31 [ "/blog" ]
31 documents, every one of them under /blog. The architectures catalog, community
pages, metrics, awards, members, events, resources and skills — the substance of the
site — are unsearchable.
Recommendation
Replace docusaurus.config.js:242:
plugins: [require.resolve("docusaurus-plugin-search-local")],
with:
plugins: [
[
require.resolve("docusaurus-plugin-search-local"),
{
// Docs are served at the site root (presets.docs.routeBasePath: "/"),
// so the plugin default of ["docs"] matches no route and the index
// ends up containing blog pages only.
docsRouteBasePath: "/",
},
],
],
Verified locally at 26946ba: with that change the same build emits 642 indexed
documents instead of 31 —
{ "/blog": 31, "/architectures": 325, "/community": 194, "/skills": 44,
"/resources": 24, "/metrics": 12, "/events": 8, "/awards": 2, "/members": 2 }
Regression guard to land alongside the fix
tests/e2e/search.spec.js (added in the PR for the coverage gap issue) deliberately does
not assert docs coverage today, because that assertion fails on main. Once the config
change lands, tighten the index test by restoring:
// The index is useless if it only ever picked up the blog scaffolding, so
// require at least one docs page in it.
expect(documents.some((document) => !document.u.startsWith("/blog"))).toBe(
true,
);
and update the note at the top of that file, which currently records this defect as the
reason the assertion is absent.
Needs a human
The quality agent opens test-only PRs, so it cannot ship the docusaurus.config.js
change itself. This fix needs a human or an agent permitted to change production
configuration. The regression-guard snippet above is the test-side follow-up and can be
applied by the quality agent once the config change has merged.
Priority
- Impact: high (site search returns no docs content)
- Effort: low (one config option, verified)
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 26946ba
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Lingua principale
- JavaScript
- Stelle
- 0
- Fork
- 2
- Merge medio
- 1g 9h
- PR unite (30g)
- 232
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cncf/endusers
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
cncf/endusers#682 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cncf/endusers
Issue simili
-
Design only Leadership Survey SLFS
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
bcgov/digital-journeys#2293 ·
-
Toolkit
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
API Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jessepollak/home#1454 ·
I maintainer di solito rispondono entro 1 giorno
-
Mend: dependency security vulnerability untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
opensearch-project/OpenSearch-Dashboards#12822 ·
I maintainer di solito rispondono entro 1 giorno