docsifyjs / docsifyjs/docsify

Proposal: Add options to use pre-processed content with `beforeEach` function

Đang mở
#1,898 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
31.5k
Fork
5.8k
Merge trung bình
9 ngày 8 giờ
Pull request đã merge (30 ngày)
2

Mô tả

## Feature request

#### What problem does this feature solve?
For plugins, we have to do some pre-processing tasks, for example, we always need to ignore the code blocks, then start the processing of our plugins.
If this function not provided by docsify itself officially, then each plugin need to handle it by themselves, for users who want included many plugins, those pre-processing tasks will be executed repeatedly, which will affect the performance for loading pages.

#### What does the proposed API look like?
Haven't yet considered welly, but might can consider adding something like `afterEachXXX` for each stage of processing the markdown content, like `afterEachCodeHandled`.
I hope it should be a “new feature”, rather than a “break change”.

#### How should this be implemented in your opinion?
Haven't yet considered welly, waiting for project members to discuss this proposal, since docsify does not handle the render stages by itself other than using Marked.

#### Are you willing to work on this yourself?
Might will have some time to do this, but need helps and advices.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.