DEV Community

Discussion on: Nuxt, Meet Disqus

Collapse
 
bsantosh909 profile image
Santosh Bhandari

I guess you are aware that the plugin works when you navigate from within the website.

But if you directly go to the specific page i.e. nuxt-toolkit.overscore.media/disqus/ then the comment plugin will not work!

Collapse
 
mtpiercey profile image
Matthew Piercey

Yeah, that's a weird... quirk of the way I set it up.

Good catch; I currently have no way of fixing that particular bug, though. To be fair, it's more of a proof-of-concept than anything else, but you're right in that it isn't fully functional.

Collapse
 
bsantosh909 profile image
Santosh Bhandari

I happen to know the exact issue. Because earlier I had referred to your guide (when I was unknown about vue-disqus) and I too had the same issue.

But after digging to the core for a while I found the issues and fixed it in my site here.

So the actual issue is you importing the vue-disqus plugin in client mode. That is the reason it works when you navigate through pages but not on page reload..

If you wanna see that fix working, you can have a look at my site, and the source code here!

I hope that helps you 😄

Thread Thread
 
mtpiercey profile image
Matthew Piercey • Edited

Yep, that makes total sense (usually Vue plugins don't work in Nuxt because they aren't client-side, but this time it's the opposite). Oh, Nuxt...

I honestly never would've figured this out on my own, so thanks for sharing this.

Also, that's a very nice site you got there!

Thread Thread
 
bsantosh909 profile image
Santosh Bhandari

I am more than happy to help out, because that's how I share my knowledge and gain more knowledge as well..

And thanks for telling its nice ❤️