facebook / facebook/docusaurus
Make most features work in CommonMark mode: head, live code blocks, tabs...
- Lenguaje dominante
- TypeScript
- Estrellas
- 66.2k
- Forks
- 10k
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 52
Descripción
### 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.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.