Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Add base64 favicon and social sharing meta tags #36

Merged
merged 8 commits into from
Jun 25, 2020

Conversation

jessicaschilling
Copy link
Contributor

@jessicaschilling jessicaschilling commented Jun 22, 2020

Small enhancements to dir-index-html pages:

@jessicaschilling
Copy link
Contributor Author

jessicaschilling commented Jun 22, 2020

Thanks to @lidel for raising the idea of an inline favicon! Sending to both @Stebalien and @aschmahmann for review, since I'm not sure whose purview this falls under these days.

Favicon screenshot:
image

@Stebalien Stebalien removed their request for review June 22, 2020 22:12
@Stebalien
Copy link
Member

@aschmahmann is big boss now.

@jessicaschilling jessicaschilling changed the title Add base64 favicon Add base64 favicon and social sharing meta tags Jun 22, 2020
@jessicaschilling
Copy link
Contributor Author

Proof of display for social sharing cards ... note that these are all using https://gateway.ipfs.io/ipfs/QmUj1ZWPLTvzZhzUFqmthsCwWm6Tn8rF5cyV9h8xCSKVQ2 as a test, which is simply a view-source of my local instance of this branch saved as regular HTML.

Slack:
image

Twitter (via https://cards-dev.twitter.com/validator):
image

Facebook (via https://developers.facebook.com/tools/debug/):
image

dir-index-uncat.html Show resolved Hide resolved
dir-index-uncat.html Outdated Show resolved Hide resolved
dir-index-uncat.html Outdated Show resolved Hide resolved
jessicaschilling and others added 3 commits June 22, 2020 17:06
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
@jessicaschilling
Copy link
Contributor Author

@lidel had a great idea to dynamically insert title element for cases in which someone might be social-previewing multiple links. Amended, and new previews follow using https://gateway.ipfs.io/ipfs/QmNjia5FrrhnrUgtKmzFKvbkJNvAL2Rmc9xxYiVw5GA3xs (again, saved-as regular HTML from my local) ...

Slack:
image

Twitter (via https://cards-dev.twitter.com/validator):
image

Facebook (via https://developers.facebook.com/tools/debug/):
image

@lidel -- you'll see in the Facebook preview that something as long as a CID in that dynamic title field pushes the subtitle out of the available space. I'd actually lean toward restoring the original Facebook meta tags to result in the earlier screenshot -- I know that's not dynamic, and doesn't help differentiate if someone posts a bunch of links to FB, but at least the generic one has some meaning. LMK.

@aschmahmann -- in any case, I think we're close enough to done for you to be able to review this 😊

@jessicaschilling
Copy link
Contributor Author

@lidel OR -- this is actually preferable -- let's just reverse the title and description tags for Facebook (and others who use the og:foo meta tags). Semantically it still makes as much sense ...

Using https://gateway.ipfs.io/ipfs/QmXFhdYS5EwEVp3Ri2jARj9bmmzT1doZk5CzqVrJX2LRsp ...

Slack reverses the order from my previous comment's screenshot, since it uses the same meta tags as FB:
image

Twitter is the same as before:
image

Facebook is better:
image

Copy link

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

Seems good to me. Feel free to merge after @lidel approves.

@jessicaschilling
Copy link
Contributor Author

@lidel -- we chatted briefly about this but just want to confirm you're OK with this as it stands. Thanks!

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

LGTM, ship it! 👍

(we can always revisit Open Graph / Twitter tags in the future)

@jessicaschilling jessicaschilling merged commit 269b1d0 into master Jun 25, 2020
@jessicaschilling jessicaschilling deleted the feat/favicon branch June 25, 2020 22:03
@jessicaschilling
Copy link
Contributor Author

FYI -- this one is PR'd into go-ipfs as ipfs/kubo#7511

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

Successfully merging this pull request may close these issues.

HTTP Error 404 for /favicon.ico Improve social media previews
4 participants