[docs-infra] Allows to duplicate markdown #35352
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
In the package,
@mui/x-date-pickers
components are not fully independent. Props are shared between multiple components, but not all of them, which makes it difficult to build the documentation. For example, theDatePicker
shares a lot of logic withDateTimePickers
and with their subcomponent theDayCalendar
.To avoid having to read the entire docs to customize components, we thought about the following strategy:
DayCalendar
Problem
Such an approach has a major drawback: creating duplicate content. Which can lead to outdated content.
Solution
The proposed solution is to keep one source of truth for the content we want to repeat.
For example we could add the following in different doc pages
And define the introduction with
## Calendar customization The Calendar can be deeply customized by ... Here is an example of how to ... {{"demo": ....}} For more information, have a look at ... page
I made an experiment in the Buton page of mui/base documentation