Skip to content

Commit

Permalink
[base-ui][docs] Improve Base UI traffic from Material UI (#40875)
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
  • Loading branch information
oliviertassinari and danilo-leal committed Feb 3, 2024
1 parent 62f67a3 commit 958891b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/markdown/prepareMarkdown.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-irregular-whitespace */
const fs = require('fs');
const path = require('path');
const kebabCase = require('lodash/kebabCase');
Expand Down Expand Up @@ -63,7 +64,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 +104,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.
:::
Use the [Base UI ${markdownH1}](${headers.unstyled}) for complete ownership of the component's design, with no Material UI styles to override.
This unstyled version of the component is the ideal choice for heavy customization with a smaller bundle size.
`);
}

Expand Down

0 comments on commit 958891b

Please sign in to comment.