Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Encapsulating Docsify

未关闭
#2,135 6 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 8 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
javascript
领域
frontend, web-dev

调研方向

首先阅读 #2104 中引用的封装检查清单和相关类变更。梳理进度条、路由和模块级状态的要求,然后将完成定义为:支持可配置的进度条位置、可选的虚拟路由和外部控制路由,以及每个实例的状态,同时不破坏默认设置。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
JavaScript
星标
31.5k
派生
5.8k
平均合并
7 天 18 小时
30 天内合并 PR
9

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

docsifyjs/docsify 的其他 Issue

查看 docsifyjs/docsify 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。