plugin-social-media

0.0.3 • Public • Published

plugin-social-media

A unofficial Vuepress plugin to add social media buttons to a webpage. Buttons include share current page, like current post, and like website.

Installation

Install the plugins module:

yarn add -d nwneisen/plugin-social-media

Enable the plugin by adding it to the vuepress project's plugins:

plugins: [
    ['../../node_modules/plugin-social-media']
]

Adding Components

There are three components included with the plugin. SocialShare, for sharing a post on social media, SocialLikePost, for liking an individual post on social media, and SocialLikeUs, for liking the webpage on social media. These can be added to a component or layout using the follow.

<div>
    <SocialShare />
</div>

<script>
import SocialShare from "@SocialShare"

export default {
  components: {
    SocialShare,
  }
}
</script>

Currently SocialShare supports all platforms listed, SocialLikePost supports Twitter and Facebook, and SocialLikeUs only supports Facebook.

Configuration

Enable the different media platforms by adding them to your config.js themeConfig. At the moment, Twitter is the only platform using an actual account reference.

themeConfig: {
    socialShareTwitter: "YourTag",
    socialShareFacebook: true,
    socialShareReddit: true,
    socialShareLinkedIn: true,
    socialSharePinterest: true,
    socialShareEmail: true,
}

Package Sidebar

Install

npm i plugin-social-media

Weekly Downloads

3

Version

0.0.3

License

MIT

Unpacked Size

10.3 kB

Total Files

8

Last publish

Collaborators

  • nwneisen