Disqus is a popular comment system that can be easily added to your website.
I create a astro component to help you easily add Disqus to your Astro site, and it supports astro’s view transitions.
This article will show you how to add Disqus to your Astro site.
Usage
- Create a Disqus account and register your site.
- Install the Disqus component:
npm install astro-disqus
. - Add the Disqus component to your Astro site:
---
import Disqus from 'astro-disqus';
---
<!-- Notice: replace demo with your disqus site slug -->
<Disqus embed="https://demo.disqus.com/embed.js" />
Advanced Usage
You can customize the Disqus component by passing props:
<Disqus
embed="https://demo.disqus.com/embed.js"
url="https://example.com"
class="class-name"
style="color: red"
/>