WordPress.org

Making WordPress.org

Opened 3 years ago

Closed 6 months ago

Last modified 6 months ago

#4277 closed enhancement (fixed)

Profile template meta tweaks

Reported by: jonoaldersonwp Owned by: coffee2code
Milestone: Priority: high
Component: Profiles Keywords: seo has-patch
Cc:

Description (last modified by jonoaldersonwp)

  • Change the <title> content to: {{Full Name}} ({{Username}}) - WordPress user profile | WordPress.org. E.g., Joost de Valk (joostdevalk) - WordPress user profile | WordPress.org.
  • Add and populate a meta description tag with the (sanitized) content of the Bio field, up to 160 characters (cutting off gracefully with an ellipses character).
  • Add and populate open graph tags as follows:
<meta property="og:type" content="profile" />
<meta property="og:title" content="{{Full Name}} - WordPress user profile" />
<meta property="og:description" content="{{Meta description}}" />
<meta property="og:url" content="{{URL}}" />
<meta property="og:site_name" content="WordPress" />
<meta property="og:image" content="{{Gravatar Large Image}}" />
<meta property="profile:username" content="{{Username}}" />

Attachments (1)

4277.diff (1.4 KB) - added by tellyworth 21 months ago.

Download all attachments as: .zip

Change History (9)

#1 @jonoaldersonwp
3 years ago

  • Description modified (diff)

#2 @coffee2code
3 years ago

  • Owner set to coffee2code
  • Status changed from new to accepted

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


3 years ago

@tellyworth
21 months ago

#4 @tellyworth
21 months ago

  • Keywords has-patch dev-feedback added

attachment:4277.diff implements @jonoaldersonwp's suggestions with one or two minor changes. Mainly, the bio is trimmed to 25 words rather than 160 chars.

@coffee2code does that look reasonable to you?

#5 @coffee2code
21 months ago

  • Keywords dev-feedback removed

Ah yeah, I believe I actually have just about everything for this and most of #4280, which I worked on in tandem. I'll check if they need a refresh and get them committed shortly.

#6 @coffee2code
6 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed. Implemented across the following commits:

[17425-dotorg]:

Profiles, Head: Output meta name="description" tag based on user bio.

Truncates by word at roughly 160 characters, otherwise truncates by character length at 175. Default text is used if no bio supplied.

[17426-dotorg]:

Profiles, Head: Adjust page title format for profiles.

[17434-dotorg]:

Profiles, Head: Output open graph tags for profiles.

#7 @coffee2code
6 months ago

@jonoaldersonwp: A few things of note regarding the implementation:

RE: Descriptions:

  • The description is trimmed to the nearest word boundary at about 160 characters in length. If the description is still longer than 175, then a hard truncation happens at 175 characters. In either case, if text got truncated, &hellip; is appended.
  • If the profile has not supplied a bio, the default description of "The WordPress.org profile for {NAME}." is used, e.g. "The WordPress.org profile for user_abc (@user_abc)."

RE: Profile names used in page title and some open graph tags:

  • Instead of the proposed "Joost de Valk (joostdevalk)" format for the name in page title (and eventually schema), I prepended an '@' before the username, e.g. "Joost de Valk (@joostdevalk)", to make it clearer it references a mentionable handle. And to differentiate it from the next item...
  • Note that a number of users already have parenthesized text as a part of their display name, so we end up with "Ipstenu (Mika Epstein) (@\ipstenu)" or "Samuel Wood (Otto) (@\otto42)" (minus the \). Not really a problem, but just worth noting.

#8 @jonoaldersonwp
6 months ago

This is awesome! Thanks for tackling this :)

Note: See TracTickets for help on using tickets.