Add social sharing links to posts in Headline theme

I’m using Headline theme on Ghost Pro, and would like to find a way to add social sharing links into my Posts, so readers can easily share a post if they choose to.

This seems common in other themes, but is not present in Headline?

Is it possible to add this somehow?

1 Like

Following this post as I am looking for the same feature.

Do you have the ability to edit the theme (or make a custom template for posts in the theme), or do you need a code injection solution?

Hi Cathy,

I’m using the vanilla Headline theme on Ghost Pro.

I’ve figured out how I can download and customise the theme, or use injection - whichever is easier.

I’m not familiar with Ghost themes so I’m hoping that someone out there might have a step-by-step that will allow me to achieve the outcome without really needing to know much about how the templating works.

Here’s an example for how to do it for Twitter.

Add the script to the theme or via code injection, and then you just need that tagged div in your theme template.
If you don’t want that styling, you could build your own button. You need to generate a link that looks something like this:
https://twitter.com/intent/tweet?text=How%20to%20post%20links%20in%20a%20Tweet&url=https%3A%2F%2Fhelp.twitter.com%2Fen%2Fusing-twitter%2Fhow-to-tweet-a-link
So I’d look at the url and title helpers for constructing that link in .hbs, because you sure don’t want to do each one individually. You’d need some javascript to assemble that link, since it needs to be url_encoded.

The situation is going to be similar (but not identical) for other social media.

An easy alternative is to look at something like AddThis, which lets you add multiple social buttons pretty easily. You may have privacy concerns.

One more idea - is there another theme that already does this successfully? I’d grab the code from there, if it does!

Update: Oh look, someone did do it already - maybe start here? How to add sharing buttons to your Ghost blog

1 Like