Skip to content

feat: improve seo & social media links #143

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

Merged
merged 20 commits into from
Jun 13, 2020
Merged

feat: improve seo & social media links #143

merged 20 commits into from
Jun 13, 2020

Conversation

ljosberinn
Copy link
Contributor

@ljosberinn ljosberinn commented Jun 12, 2020

fixes #135

Not sure if the robots.txt will work like that, currently there's none.
Didn't work. If meta tags arent fine, I'll try to use redirects.

Went through:

@ljosberinn ljosberinn marked this pull request as draft June 12, 2020 16:08
@ljosberinn
Copy link
Contributor Author

Experimented a bit with the images & tags as you can see. Can't remove the triple headline on Discord for some reason.

image
image

@ljosberinn ljosberinn marked this pull request as ready for review June 12, 2020 16:52
@smeijer
Copy link
Member

smeijer commented Jun 12, 2020

Can't remove the triple headline on Discord for some reason.

Not a huge issue, but do other sites also have that problem?

@ljosberinn
Copy link
Contributor Author

No, only Discord. Inspecting class names was what made me experiment, because..

  1. Testing-Playground is called embedProvider
  2. Testing Playground is called embedAuthor
  3. Testing Playground is called embedTitle

But we don't use author with any other value than your name, so I suspect a opengraph-parsing mistake on discords end. All 3 link to the same url anyways.

@smeijer
Copy link
Member

smeijer commented Jun 12, 2020

Sorry I meant, if you would post another site in a discord channel. Do they also render their title three times?

But, it turns out, it doesn't. So there must be something that we're missing.

Screenshot_20200612-213725

@ljosberinn
Copy link
Contributor Author

ljosberinn commented Jun 12, 2020

To be fair, tweets are something else, but yeah, I'll keep continue digging because I don't see that behaviour on any of my own sites 😅

For reference: https://twitter.com/CoinbitIO/status/1136959919612145664

@smeijer
Copy link
Member

smeijer commented Jun 12, 2020

To be fair, tweets are something else

I see 😅 long live standards

@smeijer
Copy link
Member

smeijer commented Jun 12, 2020

This one shows the title at three places, can it be related? (name, og:title, og:site_name)

https://opengraphcheck.com/result.php?url=https%3A%2F%2Fdeploy-preview-143--testing-playground-com.netlify.app

@ljosberinn
Copy link
Contributor Author

Yeah, I assume Discord is using one of those as author for some reason. Or it's actually picking up on the oembed, which why I updated that too.

@ljosberinn
Copy link
Contributor Author

ljosberinn commented Jun 12, 2020

Well, it's the oembed! provider_name + host, author_name + author_url and finally og:title + og:url.

image

Final edit:

image

Testing Playground links to the site; your name links to the repo.

- revert debug meta changes
@smeijer
Copy link
Member

smeijer commented Jun 12, 2020

Can we also leave some elements out? I don't really need to have my name there so prominently visible.

Testing Playground is no longer mine. We have a number of contributors now.

@smeijer
Copy link
Member

smeijer commented Jun 12, 2020

And maybe we should just use the frog instead of that screenshot? What do you think?

Nice work by the way! I like where this is going 🙂👍

@ljosberinn
Copy link
Contributor Author

Can we also leave some elements out? I don't really need to have my name there so prominently visible.

Sure! I just figured there's a reason it was initially added. If the oembed is exclusively crawled when also crawling the site, I'd just drop provider_name, host, author_name + author_url alltogether because it's duplicate content as already provided in meta tags anyways.

And maybe we should just use the frog instead of that screenshot? What do you think?

I'm on the fence about the frog. Sites will go for rel="icon" and will scale it up to their dimensions, which makes the frog pop out of the embed, effectively cutting it off on the top and bottom. If you prefer that, I'm on board with it. Looks the cleanest on Discord too ironically. That said, the site.png looks odd on Discord but is fine for the others. Can't have both at the same time though.

image
image
image

@ljosberinn
Copy link
Contributor Author

I'll try to see how much of the oembed info can be omitted so that embed.ly and iframely are still happy.

@ljosberinn
Copy link
Contributor Author

Dropped author meta tag & author info in oembed. When keeping the author tag but dropping the info in oembed, embed.ly will use the author tag as replacement and you wanted it removed anyways.

The only occurance of your name is now indirectly through the site:creator twitter tag, is that ok?

Discord looks like this now, using provider_name + host and og:title:
Bildschirmfoto 2020-06-13 um 14 23 20

Twitter etc. are unchanged.

Embed.ly is still happy. But apparently I'm unable to test iframely with a deploy preview?

@smeijer
Copy link
Member

smeijer commented Jun 13, 2020

The only occurance of your name is now indirectly through the site:creator twitter tag, is that ok?

Yeah, that's okay :)

Discord looks like this now, using provider_name + host and og:title:

Can we make that gray testing playground (the top most) into testing-playground.com? Or will that cause trouble on other sites?

@ljosberinn
Copy link
Contributor Author

Good idea, seems to work just fine.

Bildschirmfoto 2020-06-13 um 16 02 13

@smeijer
Copy link
Member

smeijer commented Jun 13, 2020

Awesome! I'm okay with merging this if you are.

I'm am curious though, how did Kent do this? Is it a different image source?

Screenshot_20200613-162644

@ljosberinn
Copy link
Contributor Author

ljosberinn commented Jun 13, 2020

Thanks for the heads up, didn't know you could enforce that.

Bildschirmfoto 2020-06-13 um 17 24 11

Guess it can be merged then :)

@smeijer smeijer changed the title feat: seo feat: improve seo & social media links Jun 13, 2020
@smeijer smeijer merged commit b02dec2 into testing-library:develop Jun 13, 2020
@smeijer
Copy link
Member

smeijer commented Jun 13, 2020

Thanks for your hard work on this! Much appreciated!

@smeijer
Copy link
Member

smeijer commented Jun 13, 2020

@all-contributors please add @ljosberinn for code.

*edit, Oops. you were already there! I'm new to this. 😇

@allcontributors
Copy link
Contributor

@smeijer

I've put up a pull request to add @ljosberinn! 🎉

@ljosberinn ljosberinn deleted the feature/seo branch June 13, 2020 19:15
@smeijer
Copy link
Member

smeijer commented Jun 23, 2020

@ljosberinn, do you know how to populate the thumbnail on twitter?

When browsing twitter, I see two versions:

  1. Image on the left:

  2. Big image on top

    But this is how playground renders (tweet):

@ljosberinn
Copy link
Contributor Author

I will take a look!

@ljosberinn
Copy link
Contributor Author

After investigating for a while, it might just be because the image has a leading slash. Tags itself should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[seo] meta tags, especially open graph
2 participants