aerni / social-links
Easily generate Social Sharing Links
Installs: 23 859
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 5
Open Issues: 0
Requires
- php: ^8.0
- statamic/cms: ^4.0 || ^5.0
README
This addon provides an easy way to create social profile and sharing links for channels like Facebook, Twitter and more.
Installation
Install the addon using Composer.
composer require aerni/social-links
Supported Channels
This addon supports the following social channels:
Facebook
, GitHub
, Instagram
, LinkedIn
, Mail
, Pinterest
, Telegram
, Twitter
, Vimeo
, WhatsApp
, Xing
, YouTube
Profile Link
Create a link to a social profile by providing the social channel
and handle
of the profile:
{{ social:profile channel="facebook" handle="michaelaerni" }}
Or using the shorthand:
{{ social:facebook:profile handle="michaelaerni" }}
Sharing Link
Create a sharing link by providing the social channel
:
{{ social:share channel="facebook" }}
Or using the shorthand:
{{ social:facebook:share }}
Parameters
There are a number of parameters you may use to customize the sharing links:
The url
will be placed in the body of the email by default. You can customize the email body text by using the body
parameter. Note, that this will override the default body text that includes the url
. You will have to manually add the url
in the body
parameter like so:
{{ social:mail:share body="I want to share this great site with you: {permalink}" }}
Telegram
Channel Name
Get the name of a social channel:
{{ social:name channel="facebook" }}
Or using the shorthand:
{{ social:facebook:name }}
Tag Pair
You may also use a tag pair to get all the data at once:
{{ social channel="facebook" handle="michaelaerni" }} {{ profile }} {{ share }} {{ name }} {{ /social }}
Or using the shorthand:
{{ social:facebook handle="michaelaerni" }} {{ profile }} {{ share }} {{ name }} {{ /social:facebook }}`