npm install vue-disqus --save
You can get your shortname after register your webiste in Disqus Admin.
import Vue from 'vue' import VueDisqus from 'vue-disqus' Vue.use(VueDisqus, { shortname: 'your-disqus-shortname', })
export default { // ... plugins: [ '~/plugins/disqus` ] }
Disqus
vue component to your vue file<template> <div class="comments"> <Disqus /> </div> </template>
DisqusCount
vue component to your vue file to display comments countSee documentation to get detail information.
<template> <div> <DisqusCount tag="a" :url="`/articles/${article.slug}`" :identifier="`/articles/${article.slug}`" /> </div> </template>