diff --git a/_config.yml b/_config.yml index 6e69e228a0..2e61e6eb85 100644 --- a/_config.yml +++ b/_config.yml @@ -105,13 +105,34 @@ JB : mixpanel : token : '_MIXPANEL_TOKEN_' - # Settings for sharing helper. - # Sharing is for things like tweet, plusone, like, reddit buttons etc. + # Settings for sharing + # Sharing is for things like tweet, plusone, hn upvotes, like, linkedin + # Add a tweet button => provider : tweet + # Add a like button => provider : like (you also need a facebook appid) + # Add a plus one button => provider : plusone + # Add a HN button => provider : hn + # Add them all (i.e. hn + tweet + plusone + like) => provider : all # Set 'provider' to the sharing provider you want to use. # Set 'provider' to false to turn sharing off globally. # sharing : - provider : false + provider : all + twitter : + size : + via : + count : + facebook : + appid : 205602882797935 + layout : button_count + font : + faces : false + width : 90 + googleplus : + size : medium + width : + annotation : bubble + linkedin : + counter : right # Settings for all other include helpers can be defined by creating # a hash with key named for the given helper. ex: diff --git a/_includes/JB/sharing b/_includes/JB/sharing index f5b11518bd..1e61847d2f 100644 --- a/_includes/JB/sharing +++ b/_includes/JB/sharing @@ -1,8 +1,18 @@ -{% if site.safe and site.JB.sharing.provider and page.JB.sharing != false %} +{% if site.JB.sharing.provider and page.sharing != false %} -{% case site.JB.sharing.provider %} -{% when "custom" %} - {% include custom/sharing %} -{% endcase %} + {% case site.JB.sharing.provider %} + {% when "like" %} + {% include JB/sharing-providers/facebook %} + {% when "tweet" %} + {% include JB/sharing-providers/twitter %} + {% when "plusone" %} + {% include JB/sharing-providers/googleplus %} + {% when "linkedin" %} + {% include JB/sharing-providers/linkedin %} + {% when "hn" %} + {% include JB/sharing-providers/hn %} + {% when "all" %} + {% include JB/sharing-providers/global %} + {% endcase %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/_includes/JB/sharing-providers/facebook b/_includes/JB/sharing-providers/facebook new file mode 100644 index 0000000000..bd62b5334f --- /dev/null +++ b/_includes/JB/sharing-providers/facebook @@ -0,0 +1,10 @@ +
+ + +
diff --git a/_includes/JB/sharing-providers/global b/_includes/JB/sharing-providers/global new file mode 100644 index 0000000000..2c7863725d --- /dev/null +++ b/_includes/JB/sharing-providers/global @@ -0,0 +1,64 @@ +
+ + + + diff --git a/_includes/JB/sharing-providers/googleplus b/_includes/JB/sharing-providers/googleplus new file mode 100644 index 0000000000..8981a6a80e --- /dev/null +++ b/_includes/JB/sharing-providers/googleplus @@ -0,0 +1,9 @@ +
+ + diff --git a/_includes/JB/sharing-providers/hn b/_includes/JB/sharing-providers/hn new file mode 100644 index 0000000000..92f8b3cde1 --- /dev/null +++ b/_includes/JB/sharing-providers/hn @@ -0,0 +1,21 @@ + + diff --git a/_includes/JB/sharing-providers/linkedin b/_includes/JB/sharing-providers/linkedin new file mode 100644 index 0000000000..b674c8c789 --- /dev/null +++ b/_includes/JB/sharing-providers/linkedin @@ -0,0 +1,2 @@ + + diff --git a/_includes/JB/sharing-providers/twitter b/_includes/JB/sharing-providers/twitter new file mode 100644 index 0000000000..d9dc0614a5 --- /dev/null +++ b/_includes/JB/sharing-providers/twitter @@ -0,0 +1,3 @@ +Tweet + + diff --git a/_includes/themes/twitter/post.html b/_includes/themes/twitter/post.html index 0b9f4725ec..febacb9017 100644 --- a/_includes/themes/twitter/post.html +++ b/_includes/themes/twitter/post.html @@ -22,6 +22,11 @@

{{ page.title }} Supporting tagline


+ +
+ {% include JB/sharing %} +
+ {% include JB/comments %}