Social Shares Version 2.0 is Out!

A few months have passed since our last update. This time around we’ve added new Social Media links to the code!

The new links are as follows:

  • Pinterest
  • WhatsApp
  • Email app (services)

In the future we will like to add custom API intergrations to record clicks and visits from your Astro website! Also, we’re still working on a method to enable the Astro {title} feature:

// Astro Title to Match URL pathway.
Astro = { title }

//Needs to be adjusted/implemented here:
 case 'twitter':
      shareUrl = `https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(description)}`;
      break;
// (descrption) method would be replaced with Astro { title }.
// under encodeURIComponent();

// Then be updated to the HTML side:
 <a href={getShareUrl('reddit', Astro.url, 'Astro.title')} target="_blank" rel="noopener">
// This doesn't work as of now. Still researching!

We’re currently testing out a couple of different things and will let everyone know on a future update release.

We have also updated and redesigned the SocialShares static splashpage for demonstration purposes. This give a little better context on what that site is about and regarding to.

Feel free to customize this script however you seem fit and share it to our Github page!

What is Social Shares?

Social Shares Online Demo

Installation and Instructions