Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Allow search index starting points for additional sidebar files in nested folders

Aperta
#1,749 1 commento 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript

Direzione di ricerca

Inizia con la modalità automatica del plugin di ricerca e il loader della barra laterale, incluso il modo in cui viene rispettato loadSidebar; traccia come i file _sidebar.md annidati entrano attualmente nell'indice. Il lavoro è completato quando i punti di partenza sidebarPaths proposti vengono cercati insieme alla barra laterale di primo livello, senza richiedere la navigazione manuale o l'elenco di ogni file di documentazione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement needs discussion

Feature request

What problem does this feature solve?

Search in Docsify works by indexing the top level sidebar content. This is fine, but as a set of documentation grows there will likely be folders added, and the sidebar continues to grow. In order to limit the growth of the sidebar, we can use nested _sidebar.md files in subfolders - problem solved.

If you then check the search index via inspecting your browser's local storage, you don't see any of the content from nested _sidebar.md files until you manually navigate to them. This is because Docsify is not loading these, which is expected behavior.

The search plugin allows an auto mode, or you can manually list the path to every file in your documentation and they'll all be indexed. For large documentation sites this is not workable.

What does the proposed API look like?

It would be great if we had a new configuration option for search, where we could index sidebarPaths (or similar). These would not need to be indexed directly, but would be used as starting points for the index since they do contain links to everything accessible in that folder.

search : {
  paths: 'auto',
  sidebarPaths : [
    '/folder'
    '/team-guidelines'
  ]
}
How should this be implemented in your opinion?

With the above config, while still working in "auto" mode, instead of only looking at /_sidebar.md search would additionally look at /folder/_sidebar.md and /team-guidelines/_sidebar.md.

This should honor loadSidebar if configured, so that people can call their sidebar whatever they like but still search it.

Are you willing to work on this yourself?

Yes, but I'm not a very experienced Javascript developer so I'm likely not the best fit.

Lingua principale
JavaScript
Stelle
31.5k
Fork
5.8k
Merge medio
2g 14h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docsifyjs/docsify

Tutte le issue di docsifyjs/docsify

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.