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 all 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
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');
@@ -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 === '') {
@@ -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.
`);
}

Loading