@miyaoka/nuxt-twitter-widgets-module
v0.0.1
Published
Twitter widgets loader for Nuxt
Downloads
36
Readme
@miyaoka/nuxt-twitter-widgets-module
Twitter widgets loader for Nuxt
Features
- Add twitter widgets script to header
- Initialize embedded tweet content on component mounted or updated by custom directive.
Setup
- Add
@miyaoka/nuxt-twitter-widgets-module
dependency using yarn or npm to your project - Add
@miyaoka/nuxt-twitter-widgets-module
tomodules
section ofnuxt.config.js
{
modules: [
// Simple usage
'@miyaoka/nuxt-twitter-widgets-module',
// With options
[
'@miyaoka/nuxt-twitter-widgets-module',
{
directiveName: 'twitter-widgets',
scriptUrl: '//platform.twitter.com/widgets.js'
}
]
]
}
Usage
Add directive (default: v-twitter-widgets) to component that has tweet.
<some-component v-html="hasTweetText" v-twitter-widgets/>
Development
- Clone this repository
- Install dependnecies using
yarn install
ornpm install
- Start development server using
npm run dev
License
Copyright (c) Masaya Kazama mailto:[email protected]