dart-lang / site-www

Source for Dart website
https://dart.dev
Other
969 stars 702 forks source link

Add structured data for the home page #501

Open kevmoo opened 6 years ago

kevmoo commented 6 years ago

See https://search.google.com/structured-data/testing-tool/u/0/?url=https://pub.dartlang.org/#url=https%3A%2F%2Fpub.dartlang.org%2F

VS

https://search.google.com/structured-data/testing-tool/u/0/?url=https://pub.dartlang.org/#url=https%3A%2F%2Fpub.dartlang.org%2F Should enable

https://developers.google.com/search/docs/data-types/sitelinks-searchbox https://developers.google.com/search/docs/data-types/logo https://developers.google.com/search/docs/data-types/social-profile

kwalrath commented 6 years ago

I think the second URL should be https://search.google.com/structured-data/testing-tool/u/0/?url=https://www.dartlang.org/#url=https%3A%2F%2Fwww.dartlang.org%2F.

More info:

@kevmoo, do you have any particular recommendations for how we should add structured data?

kevmoo commented 6 years ago

We put it in as ld+json. See

https://github.com/dart-lang/pub-dartlang-dart/blob/1ca93dcb1d1e1489bec4768de553b9091974cc58/app/test/frontend/golden/index_page.html#L115

I could imagine some clever scripting to do this for all pages, but AFAIK just getting the homepage bits in would be a help...

kwalrath commented 5 years ago

We already have a search box and logo in our results, even without this: image

But no social stuff, perhaps because we don't prominently link to it. Perhaps we should fix #256 first, and then see if we get social listings as a result.

Are there other reasons to add this structured data?