social-tags-webpack-plugin
social-tags-webpack-plugin
is a webpack plugin that generates a the meta-tags to facebook and twitter, like this:
Install
npm install --save-dev social-tags-webpack-plugin
yarn add -D social-tags-webpack-plugin
Usage
In your webpack.config.js
:
// ES6+const SocialTags = ... plugins: ... appUrl: 'http://example.com/' facebook: 'fb:app_id': "123456789" 'og:url': "http://example.com/page.html" 'og:type': "website" 'og:title': "Content Title" 'og:image': 'src/img/book.png' 'og:description': "Description Here" 'og:site_name': "Site Name" 'og:locale': "en_US" 'og:article:author': "" twitter: "twitter:card": "summary" "twitter:site": "@site_account" "twitter:creator": "@individual_account" "twitter:url": "http://example.com/page.html" "twitter:title": "Content Title" "twitter:description": "Content description less than 200 characters" "twitter:image": './src/img/book.png'