facebook / facebook/docusaurus
Make most features work in CommonMark mode: head, live code blocks, tabs...
- 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ả
### Motivation
Related to the CommonMark support issue: https://github.com/facebook/docusaurus/issues/3018
Some custom elements we created do not work when using the CommonMark parser mode, that you can turn on using:
- `frontMatter.mdx.format: 'md'`
- `config.markdown.format: 'detect'` + using the `.md` extension
---
I think it would be convenient for users to have features working fine in both modes in a consistent way. I believe it is possible, but may require some adaptations.
Here are some components that do not currently work:
---
## SEO
This should work in CommonMark too, but currently does not:
```md
HEAD Markdown Page tests title
```
## Summary/details
Renders as:

Instead of:

---
## Live code editor
Renders as:

Instead of:

---
## Tabs
Renders as: N/A because we don't have any syntax that does not require using MDX/ESM imports.
Instead of:

Possible solution? IMHO this syntax should be allowed without imports:
```md
This is an apple 🍎
This is an orange 🍊
This is a banana 🍌
```
### Structured data
As part of https://github.com/facebook/docusaurus/pull/9669 we are adding a `@theme/StructuredData` helper component:
```mdx
import StructuredData from "@theme/StructuredData";
# Title
```
We should figure out how to define structured data in CommonMark mode
### Self-service
- [X] I'd be willing to do some initial work on this proposal myself.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.