Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs-infra] Allow {{"component": “}} to import from same markdown folder #41127

Open
oliviertassinari opened this issue Feb 16, 2024 · 2 comments
Labels
enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 16, 2024

Summary

Having to the component source outside of the markdown folder like in https://github.com/mui/material-ui/blob/master/docs/data/material/all-components/all-components.md is not great. You want to be able to delete a page of the docs and all its related content all at once (closer folders).

Examples

No response

Motivation

No response

Search keywords: -

@oliviertassinari oliviertassinari added enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product labels Feb 16, 2024
@flaviendelangle
Copy link
Member

flaviendelangle commented Feb 16, 2024

Follow up on #34243

@danilo-leal danilo-leal moved this to Backlog in Docs-infra Feb 16, 2024
@oliviertassinari
Copy link
Member Author

To provide more details on the problem, the goal is to have the .js file and the markdown in the same folder but:

  1. The use of {{"demo": resets the theme to use the default of Material UI, which isn't the theme of the docs. So ❌
  2. The use of bg:"inline" doesn't include a padding on mobile, this needs to be added back ⚠️
  3. The use of {{"component": doesn't allow to import the components from the same folder as ``{{"demo":` would So ❌

We could solve this in different ways:

  • a. support import path from a higher level, by fixing 3
  • b. have a demo flag to keep the default theme and another one for the layout. But I get the feeling that it's what {{"component": vs. {{"demo": is all about. So option a. might make the most sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product
Projects
Status: Backlog
Development

No branches or pull requests

2 participants