Vue component to integrate Disqus comments in your application Vue.js, with support for SPA and Vue 2.*
$ npm install vue-disqus
For Vue 1.* use v1.0.2 -
npm install --save vue-disqus@1.0.2
<template>
// omited (identifier and url are optional)
<div class="comments">
<disqus shortname="your_shortname_disqus" :identifier="page_id" url="http://example.com/path"></disqus>
</div>
</template>
<script>
import VueDisqus from 'vue-disqus/VueDisqus.vue'
export default {
// ...
components: {
VueDisqus
}
}
// ...
var VueDisqus = require('vue-disqus')
<!-- Required Javascript -->
<script src="vue.js"></script>
<script src="node_modules/vue-disqus/vue-disqus.js"></script>
<!-- Assuming your view app is APP. -->
<body id="app">
<div class="comments">
<vue-disqus shortname="your_shortname_disqus"></vue-disqus>
</div>
</body>
Prop | Data Type | required | Description |
---|---|---|---|
shortname |
String | true | Your shortname disqus. |
title |
String | false | Title to identify current page. |
identifier |
String | false | Your unique identifier |
sso_config |
Object | false | Single sign-on (SSO) |
api_key |
String | false | Your API key disqus |
remote_auth_s3 |
String | false | implementation with Laravel/PHP |
Event name | Description |
---|---|
ready |
When Disqus is ready. This can be used to show a placeholder or loading indicator. |
See Event Handling.