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

[base-ui][docs] Improve Base UI traffic from Material UI #40875

Merged
merged 6 commits into from
Feb 3, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/markdown/prepareMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function prepareMarkdown(config) {
const { filename, markdown, userLanguage } = translation;
const headers = getHeaders(markdown);
const location = headers.filename || `/${fileRelativeContext}/${filename}`;
const title = headers.title || getTitle(markdown);
const markdownH1 = getTitle(markdown);
const title = headers.title || markdownH1;
const description = headers.description || getDescription(markdown);

if (title == null || title === '') {
Expand Down Expand Up @@ -102,9 +103,8 @@ function prepareMarkdown(config) {
contents.push(`
## Unstyled

:::success
[Base UI](/base-ui/) provides a headless ("unstyled") version of this [${title}](${headers.unstyled}). Try it if you need more flexibility in customization and a smaller bundle size.
:::
A version of this component is available without any styles: [Base UI ${markdownH1}](${headers.unstyled}).
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
Use this component for heavy customizations or smaller bundle sizes.
oliviertassinari marked this conversation as resolved.
Show resolved Hide resolved
`);
}

Expand Down
Loading