vue-disqus-count
Vue Plugin for embedding Disqus comment count.
Installation
npm install --save vue-disqus-count
or
yarn add vue-disqus-count
Import
Global Registration
Vue
Not Using Webpack
If you don't use webpack (for example in CodePen etc):
or use unpkg
and then you still need to install it:
Vue
Basic Usage
Create an account at Disqus and obtain the shortname
for your app,
it's required when you register the plugin.
Vue
The next thing that is important is, you can not use url
with hash
mode (if your url have #/
this thing, it won't work).
So if you use vue-router
, make sure it's in history
mode.
It is caused by Disqus doesn't support #/
, but they support #!/
path.
You can use only identifier
or only url
, or both.
... ...
Example
See the Demo and the corresponding code
Caveats
As I have said before, you can not use hash
mode. Use history
mode. Or if you really want to use hash
mode,
you need to use hashbang
(#!/
) rather than hash
(#/
).
Question?
If you have question, just post in issues.