-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add logo and meta tags for twitter_cards #345
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Joe, LGTM.
No, Surge never worked well. This isn't too hard, I'll open an issue and find a volunteer to set this up again, probably on Netlify. |
@joelachance Thank you for looking into it! I tested it on Twitter and Facebook, and it doesn’t seem to be working. Could you check again on your end? |
I'm not getting anything showing up in the card validator for https://numpy.org either. I looked on the site and wasn't finding anything pertaining to this in the head element, would this have been deployed, @rgommers? |
Yep, it's not deployed - I have an open PR with a deploy method, but didn't merge it yet. Now that we have good preview with Netlify, I think we can switch to auto-deploying. It requires everyone who merges a PR to make sure things actually work, but I think we can trust everyone with that. It will save a lot of hassle to have auto-deployment. I'll look at finishing that up now. |
Ok, I looked into this, and I think this is an issue with Hugo's twitter template. We point images to twitter cards using (in the config)
We refer to our logo using that same path everywhere, and it works everywhere (except Twitter!). The difference between the Twitter image path and the rest of them is that they render in the browser a bit differently. Twitter meta data: https://numpy.org/logos/numpy.svg Note the missing /images. I'm updating the |
Thank you for looking into it, Joe! |
Adds meta tags for twitter cards.
It looks like the card validator won't show the image, but it's because the URL is still looking at localhost (ngrok isn't that good!)
Card Validator: https://cards-dev.twitter.com/validator
Complementary screenshot:
@InessaPawson, to change what shows up in the card, you'll want to edit the description and image under the params object in the config.yaml. See examples here: https://gohugo.io/templates/internal/#twitter-cards
@rgommers, I don't know if we have some kind of staging any longer (I know our staging deployment site never worked that great), but it would be great to test it out there if possible. Otherwise, this is a pretty minor change that doesn't effect the site, only twitter cards.