docsifyjs / docsifyjs/docsify

Encapsulating Docsify

Offen
#2,135 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
31.5k
Forks
5.8k
Ø Merge
9 T. 8 Std.
Gemergte PRs (30 T.)
2

Beschreibung

We need allow the ability to fully encapsulate Docsify features and state.

With encapsulation, it will be possible later on to mount any number of `Docsify` instances anywhere in a web site, as well as become possible to wrap `Docsify` as a React/Vue/Svelte/etc component that can be used in any framework.

Encapsulation changes:

- [ ] progress bar currently appends to body. There should be an option to provide the location where it should be appended. It can default to body for backwards compatibility.
- [ ] Routing: it currently assumes control of the address bar. For backwards compatibility, this can be the default.
- [ ] We need an option to make it route _virtually_, without touching the address bar, for cases when that is desirable
- [ ] Perhaps add the ability to listen to a `Docsify` instance's route changes, so that they can be mapped to the address bar in a custom way. Also allow setting Docsify's route from outside, so that a website managing multiple instances can "paginate" Docsify manually.
- [ ] Some Docsify state is at the module level (singleton), including the aforementioned progress bar, but also including state variables. We should bring state into the `Docsify` class. Some of this this in #2104 in the items where we're bringing some functions into the classes as private methods.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.