Socket
Socket
Sign inDemoInstall

vue-disqus

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-disqus

Vue component to integrate Disqus comments in your application, with support for SPA


Version published
Weekly downloads
1.9K
increased by5.92%
Maintainers
1
Install size
24.2 kB
Created
Weekly downloads
 

Changelog

Source

3.0.5 (2018-10-01)

<a name="3.0.3"></a>

Readme

Source

vue-disqus

Vue component to integrate Disqus comments in your application Vue.js, with support for SPA and Vue 2.*

Installation

Install package via NPM
$ npm install vue-disqus
Include via CDN
<script src="https://cdn.jsdelivr.net/npm/vue-disqus@3/dist/vue-disqus.js"></script>
Install in your vue app
import Vue from 'vue'
import VueDisqus from 'vue-disqus'

Vue.use(VueDisqus)
...

Using in Vue file components

<template>
  <div class="comments">
    <vue-disqus shortname="your_shortname_disqus" :identifier="page_id" url="http://example.com/path"></vue-disqus>
  </div>
</template>
// ...

Install in Nuxt

Create plugin file plugins/disqus.js

import Vue from 'vue'
import VueDisqus from 'vue-disqus'

Vue.use(VueDisqus)

In config file nuxt.config.js

...
plugins: [
  '~/plugins/disqus'
]

Using in Vue file components

<template>
  <div class="comments">
    <vue-disqus shortname="your_shortname_disqus" :identifier="page_id" url="http://example.com/path"></vue-disqus>
  </div>
</template>
// ...

Using with HTML files

Add the component to the base instance Vue
<!-- Required Javascript -->
<script src="https://vuejs-cdn-link"></script>
<script src="https://unpkg.com/vue-disqus"></script>
<!-- Assuming your view app is APP. -->
<div id="app">
  <div class="comments">
    <vue-disqus shortname="your_shortname_disqus"></vue-disqus>
  </div>
</div>

Props

PropData TyperequiredDescription
shortnameStringtrueYour shortname disqus.
titleStringfalseTitle to identify current page.
identifierStringfalseYour unique identifier
sso_configObjectfalseSingle sign-on (SSO)
api_keyStringfalseYour API key disqus
remote_auth_s3Stringfalseimplementation with Laravel/PHP
languageStringfalseLanguage overrides

Important

Don't use hash (myurl.com/#/) in urls, if you are using the vue-router always opt for HTML5 history: mode.

Events

Event nameDescription
readyWhen Disqus is ready. This can be used to show a placeholder or loading indicator.
new-commentWhen a new comment is posted. This can be used to update comment counters in real time.

See Event Handling.

License

MIT

Contributing

  • Check the open issues or open a new issue to start a discussion around your feature idea or the bug you found.
  • Fork repository, make changes, add your name and link in the authors session CONTRIBUTING.md
  • Send a pull request

If you want a faster communication, find me on @ktquez

Thank you

Keywords

FAQs

Last updated on 01 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc