YenYuHsuan / hexo-theme-beantech

:sparkles: Ported theme of Hux Blog by Kaijun, Modified by YuHsuan :sparkles:
http://beantech.org
Apache License 2.0
441 stars 105 forks source link

Share Button #6

Open YenYuHsuan opened 7 years ago

YenYuHsuan commented 7 years ago

I'd like to add some share button (FB, QQ, Line, G+, Weibo......) beside to share the current post. Does anyone recommend any library or API to use?? I will be grateful for any help you can provide, Peace 😄 !!

grt1st commented 7 years ago

Maybe you can get it from other themes. Here is what I find, a example of shared code. It's clear that they have their own way. And I think you can find more in their offical website. Good luck.

<ul>
  <li><a class="icon" href="http://www.facebook.com/sharer.php?u=The_url_you_wanna_shared"><i class="fa fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="https://twitter.com/share?url=The_url_you_wanna_shared&text=The_text_in_the_url"></a></li>
  <li><a class="icon" href="http://www.linkedin.com/shareArticle?url=The_url_you_wanna_shared&title=The_text_in_the_url"></a></li>
  <li><a class="icon" href="https://pinterest.com/pin/create/bookmarklet/?url=The_url_you_wanna_shared&is_video=false&description=The_text_in_the_url"></a></li>
  <li><a class="icon" href="mailto:?subject=The_text_in_the_url&body=Check out this article: The_url_you_wanna_shared"></a></li>
  <li><a class="icon" href="https://getpocket.com/save?url=The_url_you_wanna_shared&title=The_text_in_the_url"></a></li>
  <li><a class="icon" href="http://reddit.com/submit?url=The_url_you_wanna_shared&title=The_text_in_the_url"></a></li>
  <li><a class="icon" href="http://www.stumbleupon.com/submit?url=The_url_you_wanna_shared&title=The_text_in_the_url"></a></li>
  <li><a class="icon" href="http://digg.com/submit?url=The_url_you_wanna_shared&title=The_text_in_the_url"></a></li>
  <li><a class="icon" href="http://www.tumblr.com/share/link?url=The_url_you_wanna_shared&name=The_text_in_the_url&description="></a></li>
</ul>