The recent Yoast update came with a cool new feature: Enhanced Slack Sharing. This isn’t magic, it’s using existing Twitter-based meta tags in the HTML to add extra data to previews. Slack uses these still (Twitter dropped support), hence the name.
Here’s what it looks like:
The extra meta tags added now give us an author and an estimated reading time!
I like this. It makes a lot of sense… on blog posts. But what about your contact page? Of course not. In fact, I can’t see a use for this on any page.
If you agree, here’s a quick snippet to disable this feature on anything other than a blog post, while keeping the option enabled in Yoast itself.
But now we just lost that extra real estate. What if we could edit it to show something else? Like the price of a product? The date of an event? An arbitrary line of text? Well, we can. Here’s the building blocks for this. Please don’t use this next snippet as is, use it as the basis for your own customization.
Really cool. Now we can show whatever we want on our Slack previews.