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

feat: update font file and add meta tags #400

Merged
merged 10 commits into from
Jan 16, 2020
Merged

Conversation

jsjoeio
Copy link
Contributor

@jsjoeio jsjoeio commented Jan 16, 2020

This PR updates the FF_Virgil font file (per discussion in #394) to use a smaller file and adds the meta tags, which should show image when sharing on social media sites like Facebook and Twitter.

Changes

  • update font file and font file links
  • add og and twitter meta tags
  • add og:image:width and og:image:height tags
  • add PR template

Screenshots

The og image that was added:
og-image

Checklist

  • tested locally
  • updated the docs

Fixes #379

@jsjoeio jsjoeio self-assigned this Jan 16, 2020
@vercel
Copy link

vercel bot commented Jan 16, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/vjeux/excalidraw/f51tvc7k8
✅ Preview: https://excalidraw-git-jsjoeio-fix-font-file.vjeux.now.sh

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 16, 2020

Tested using both Facebook's Sharing Debugger and Twitter's Card Validator using the Now preview URL but not getting the expected results.

Twitter:
image

Facebook:
image

🤞🏼These results should change once merged into production. Happy to follow up and test and make changes if needed.

public/index.html Outdated Show resolved Hide resolved
@pshihn
Copy link
Collaborator

pshihn commented Jan 16, 2020

Recommend adding og:image:width and og:image:height and equivalent twitter ones as well.

"Using these tags will specify the image dimensions to the crawler so that it can render the image immediately without having to asynchronously download and process it."
https://developers.facebook.com/docs/sharing/best-practices/

@Fausto95
Copy link
Member

Just checked the font, the rendering of ! is perfect now

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 16, 2020

Thanks for the suggestion @pshihn! I'll add those in now

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 16, 2020

Okay, I think it should be good now if someone wants to review it again.

Re: @pshihn

equivalent twitter ones as well

I had the Twitter meta tags in there but @lipis suggested opting for the og:image instead.

From the quick research I did, I think it should be fine.

If an og:type, og:title and og:description exist in the markup but twitter:card is absent, then a summary card may be rendered.

Source

@lipis
Copy link
Member

lipis commented Jan 16, 2020

Maybe also update the image in the readme with this one?

@Fausto95
Copy link
Member

Fausto95 commented Jan 16, 2020

Maybe also update the image in the readme with this one?

Why not?!

I'd center the "Sketch hand-drawn like diagrams" and 👌🏼

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 16, 2020

Maybe also update the image in the readme with this one?

Good idea, done.

I'd center the "Sketch hand-drawn like diagrams"

Done!
og-image

@Fausto95
Copy link
Member

Let's ship this and see if the results of the preview cards change!

@Fausto95 Fausto95 merged commit e5e0e37 into master Jan 16, 2020
@Fausto95 Fausto95 deleted the jsjoeio/fix-font-file branch January 16, 2020 20:32
@Fausto95
Copy link
Member

Capture d’écran 2020-01-16 à 21 35 26

@jsjoeio the image doesn't show up

Copy link
Contributor

@vjeux vjeux left a comment

Choose a reason for hiding this comment

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

Yay, thanks :)

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 16, 2020

@Fausto95 you're right, i'm seeing the same thing

image

I'll see if I can figure it out. The frustrating part is you can't use the Twitter card validator on localhost (for obvious reasons). I saw someone once suggest using ngrok but I tried that and ran into a canvas security error. Open to suggestions if you have any

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 16, 2020

I wonder if it has anything to do with it being a relative path...

AH-HA - look what I found:

Documentation have nothing about it, but relative URLs will not work, only full URL including scheme works

https://stackoverflow.com/a/9858694/3015595

@Fausto95
Copy link
Member

I hope it does haha.
Let's try it out

dwelle added a commit that referenced this pull request Jan 17, 2020
@dwelle dwelle mentioned this pull request Jan 17, 2020
lipis pushed a commit that referenced this pull request Jan 17, 2020
* revert #400 font file

* Revert "Revert "Set scale for export images (#416)" (#420)"

This reverts commit d603921.
amilajack pushed a commit to palettedev/excalidraw that referenced this pull request Mar 6, 2023
- when paste the content from clipboard, if the content is not JSON, the `JSON.parse` parse error will be thrown. The info should not be in production build.

Closes excalidraw#400
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.

Add open graph for better experience when sharing on social medias
5 participants