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] Automatic title and meta description #863

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

vladmoroz
Copy link
Contributor

@vladmoroz vladmoroz added the docs Improvements or additions to the documentation label Nov 25, 2024
@vladmoroz vladmoroz requested a review from colmtuite November 25, 2024 08:41
@mui-bot
Copy link

mui-bot commented Nov 25, 2024

Netlify deploy preview

https://deploy-preview-863--base-ui.netlify.app/

Generated by 🚫 dangerJS against a67a57c

h1: (props) => (
<React.Fragment>
<h1 className="mb-4 text-3xl font-bold" {...props} />
<title>{`${getChildrenText(props.children)} · Base UI`}</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIR, we wanted to have a richer title than just the title for SEO purposes ("React Dialog component" instead of just "Dialog")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I think short titles are a much better experience for the end user.

image

I see MUI docs do that, but I'm not a fan of how messy opening a bunch of tabs from mui.com feels

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. It does look better in the browser's tabs.
@oliviertassinari, I remember you were suggesting richer titles in the past. Any opinions on this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can put the SEO juice in the url

url: /react-component-name
pageTitle: Component name • Base UI

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've agreed on the following for titles and URLs:

Dialog • Base UI
https://base-ui.com/react/dialog

Bonus, URLs are going to match import paths:

// When we do kebab-casing
import { Dialog } from "@base-ui-components/react/dialog"

// Eventually
import { Dialog } from "@base-ui/react/dialog"

Copy link
Member

@oliviertassinari oliviertassinari Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember you were suggesting richer titles in the past. Any opinions on this?

@michaldudak Right, so why do the pages of MUI follow those patterns?

  • On the SEO side, if we can trust Moz.com (account), it's a ranking factor. Because
SCR-20241127-neia

Source: https://analytics.moz.com/pro/analytics/analyze-keyword/15825137/2871441/9c418058312a1f68ac62edaa1217a2bc

Personally, I work with a small screen, my tabs are very quickly cut, I can't read them most of the time, I have learned to live without tab titles, so that's why I didn't bother so much. Or maybe it was because I always felt that onboarding is critical considering the duration developers stick to a specific stack. If someone helps win more new % users, and it's not annoying enough for them to leave, then it helps win in the long term?

We can wait to see how those pages rank. I will be curious to see. I'm creating an issue with this idea: mui/mui-public#251.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 25, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 25, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 25, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 25, 2024
@vladmoroz vladmoroz enabled auto-merge (squash) November 25, 2024 21:56
@vladmoroz vladmoroz merged commit 424a7a2 into mui:master Nov 25, 2024
22 checks passed
@vladmoroz vladmoroz deleted the basic-metadata branch November 25, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants