docsifyjs / docsifyjs/docsify

Configure docsify to use markdown-it

未关闭
#1,150 32 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
needs discussion
主要语言
JavaScript
星标
31.5k
派生
5.8k
平均合并
9 天 8 小时
30 天内合并 PR
2

描述

## Feature request

Enable the use of [markdown-it](https://github.com/markdown-it/markdown-it) renderer instead of marked.

#### What problem does this feature solve?

Docsify is an incredibly well designed documentation generator and its ease of use with Github pages makes it well suited to that purpose. Docsify uses the [marked](https://github.com/markedjs/marked) renderer.

Unfortunately, the markdown tool ecosystem is very fragmented and it is difficult to choose feature rich markdown editing tools that will render with high fidelity across static website generation frameworks. On the editing side, HackMD (& CodiMD) is a pack leader for collaboration on Github based markdown. The HackMD VSCode extension also provides a great developer experience. It uses the modern and extensible [markdown-it](https://github.com/markdown-it/markdown-it) renderer. Its plugin model is allowing it to evolve fast and create the kind of modern content that is expected in blogs, docs, and websites.

#### What does the proposed API look like?

Not an API change, but presumably it involves swapping out the underlying node packages

These are the markdown-it dependencies in HackMD:
```
"dependencies": {
"markdown-it": "^10.0.0",
"markdown-it-abbr": "^1.0.4",
"markdown-it-container": "^2.0.0",
"markdown-it-deflist": "^2.0.3",
"markdown-it-footnote": "^3.0.2",
"markdown-it-imsize": "^2.0.1",
"markdown-it-ins": "^2.0.0",
"markdown-it-mark": "^2.0.0",
"markdown-it-mathjax": "^2.0.0",
"markdown-it-regexp": "^0.4.0",
"markdown-it-sub": "^1.0.0",
"markdown-it-sup": "^1.0.0",
"markdown-it-task-checkbox": "^1.0.6",
"markdown-it-emoji": "^1.4.0"
}
```

#### How should this be implemented in your opinion?

I believe that markdown-it's extensibility makes it a great default choice for docsify and having more future-proof. Alternatively, I would be happy to have instructions for swapping out the renderer.

#### Are you willing to work on this yourself?

Yes. Assuming I am not missing some reason why this isn't pluggable. I would need assistance from docsify core contributors.

贡献指南

打开贡献指南

调研方向

该 issue 未列出任何文件、测试或入口点。首先跟踪 Docsify 当前的 marked renderer,并审查包含 32 条评论的讨论,以确定是同意将其替换为 markdown-it,还是记录 renderer 更换的文档。选定的方法完成实现或文档记录,并且 renderer 的行为得到验证,即表示完成。

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

评估

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

把新 issue 发到你的邮箱

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