facebook / facebook/docusaurus

Remove legacy admonition keywords

Đang mở
#9,307 9 bình luận 0 reaction 0 người được giao Xem trên GitHub
domain: markdown proposal
Ngôn ngữ chính
TypeScript
Star
66.2k
Fork
10k
Merge trung bình
1 ngày 3 giờ
Pull request đã merge (30 ngày)
52

Mô tả

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Motivation

We historically have admonition keyword "aliases" that we don't even document since v2.0.

![CleanShot 2023-09-14 at 17 59 26](https://github.com/facebook/docusaurus/assets/749374/c670264a-b45f-4055-aa52-d444fc25c7b8)

Those came from an old v2 dependency: https://github.com/elviswolcott/remark-admonitions

In Docusaurus v4 is time to remove them officially and throw an error for sites that still use them.

Note: in Docusaurus v3 we made `:::warning` the official admonition, and `:::caution` an alias to remove in v4 (see https://github.com/facebook/docusaurus/issues/7558)

**EDIT**: maybe we should have some kind of `siteConfig.markdown.admonitions` config and probably let users define their own set of directive/icon/color/label without requiring swizzling anything?

### Self-service

- [X] I'd be willing to do some initial work on this proposal myself.

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.