Ghost Share Links Cheat Sheet

Published:

In my previous post Add Share Links to Ghost Themes I outlined how to create no-cost share links using the Ghost handlebars API. In this post I'll provide code snippets to some of the most popular social networks that you can simply copy and paste into your custom theme.

Email

<a href="mailto:?&subject={{encode @blog.title}}%3A%20{{encode title}}&body={{encode title}}%0D%0A{{url absolute="true"}}%0D%0A%0D%0A{{excerpt words="45"}}%2E%2E%2E">
    Email
</a>

twitter

<a href="https://twitter.com/home?status={{url absolute="true"}}%20{{tags prefix="%23" separator="%20%23" autolink="false"}}">
    Twitter
</a>

Facebook

<a href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}">
    Facebook
</a>

Google+

<a href="https://plus.google.com/share?url={{url absolute="true"}}">
    Google+
</a>

LinkedIn

<a href="https://www.linkedin.com/shareArticle?mini=true&url={{url absolute="true"}}&title={{encode title}}&summary={{excerpt words="45"}}&source={{@blog.title}}">
    LinkedIn
</a>

Pinterest

<a href="https://pinterest.com/pin/create/button/?{{url absolute="true"}}{{#if image}}&media={{@blog.url}}{{image}}{{/if}}&description={{excerpt words="20"}}">
    Pinterest
</a>

tumblr

<a href="http://www.tumblr.com/share/link?url={{url absolute="true"}}&name={{encode title}}&description={{excerpt words="45"}}">
    Tumblr
</a>

reddit

<a href="http://www.reddit.com/submit/?url={{url absolute="true"}}&title={{encode title}}">
    reddit
</a>

Xing

<a href="https://www.xing-share.com/app/user?op=share;sc_p=xing-share;url={{url absolute="true"}}">
    Xing
</a>

VK

<a href="https://vk.com/share.php?url={{url absolute="true"}}&title={{encode title}}&description={{excerpt words="45"}}{{#if image}}&image={{@blog.url}}{{image}}{{/if}}&noparse=true">
    VK
</a>

buffer

<a href="https://bufferapp.com/add/?url={{url absolute="true"}}&text={{excerpt words="20"}}">
    Buffer
</a>

StumbleUpon

<a href="https://www.stumbleupon.com/submit?url={{url absolute="true"}}%2F&title={{encode title}}">
    StumbleUpon
</a>

新浪微博 (Sina Weibo)

<a href="http://service.weibo.com/share/share.php?url={{url absolute="true"}}&title={{encode title}}%0D%0A{{excerpt words="20"}}%20{{tags prefix="%23" separator="%23 %23" suffix="%23" autolink="false"}}{{#if image}}&pic={{@blog.url}}{{image}}{{/if}}">
    新浪微博
</a>

Baidu空间

<a href="http://hi.baidu.com/pub/show/share?url={{url absolute="true"}}&title={{encode title}}">
    Baidu空间
</a>

人人网 (Renren)

<a href="http://share.renren.com/share/buttonshare?link={{url absolute="true"}}&title={{encode title}}">
    人人网
</a>

腾讯微博 (QQ Tencent Weibo)

<a href="http://v.t.qq.com/share/share.php?title={{encode title}}%3A%20{{excerpt words="20"}}%20{{tags prefix="%23" separator="%23 %23" suffix="%23" autolink="false"}}&url={{url absolute="true"}}">
    腾讯微博
</a>

QQ空间

<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title={{encode title}}&url={{url absolute="true"}}&summary={{excerpt words="20"}}">
    QQ空间
</a>

腾讯朋友网 (Pengyou)

<a href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?to=pengyou&title={{encode title}}&url={{url absolute="true"}}&summary={{excerpt words="20"}}">
    腾讯朋友网
</a>

And there you have it. Share links that you can copy and paste into your theme. Now if you're wondering what they look like in the wild, well here they are- maybe try clicking one and share this post yourself.