babel / website

:globe_with_meridians: The Babel documentation website
https://babeljs.io/docs/en/index.html
MIT License
749 stars 1.31k forks source link

Design/Art: Better REPL Twitter Embed #1383

Open hzoo opened 6 years ago

hzoo commented 6 years ago

https://twitter.com/left_pad/status/909088586473115648

When you post a link to the repl on twitter and elsewhere, we should change what it shows? Maybe it should just not have the same picture/etc (just remove it entirely), it's annoying?

Example

screen shot 2017-09-28 at 7 00 00 am
xtuc commented 6 years ago

I'm wondering how you could generate a picture of the code (without a backend?).

Either we should remove the cover because it's annoying or an picture with "click to see the REPL" or something.

asthas commented 6 years ago

@hzoo I want to do it!

hzoo commented 6 years ago

Awesome. Since I didn't really go into the solutions - do you understand the issue though? It's just that either we

I think removing the image for social media seems reasonable (simple, easiest)

asthas commented 6 years ago

@hzoo Even I feel the same that removing the pictures for repl is the best possible solution. So should I implement it?

hzoo commented 6 years ago

Great, sounds good.

I believe the image is from https://github.com/babel/website/blob/master/_includes/head.html, but not sure how you remove it from the repl link (I guess another question is whether we would want to remove it entirely)

I guess jekyll may have a way to check the page.url first

Oh wait I already see a {% if page.permalink != '/repl/' %}

asthas commented 6 years ago

@hzoo I agree, doing it in jeklly by conditionally removing the meta-tag for repl links would be the ideal solution in my mind

asthas commented 6 years ago

@hzoo I feel the error is because of lines 31, 33, 37, these would also need a repl check.