
Analog User Guide - Comment System
Published on · Edited on

Hogwarts School
Magic school for young wizards
Previous Article
MDX Style DemoNext Article
Analog User Guide - Web Analytics SystemTable of Contents
Analog supports Giscus comment system, which is built on top of GitHub Discussions. Now, let's demonstrate how to set it up.
Setting Up Giscus
Giscus is a free and open-source project.
Create a Giscus Instance
First, go to Giscus and set it up per the instructions.
Note that, please make sure that:
- The target repository is public, otherwise visitors will not be able to view the discussion. The target repository can be the same as your blog's repository, or a separate one.
- The Giscus app is installed, otherwise visitors will not be able to comment and react.
- The Discussions feature is turned on by enabling it for your repository.
If everything is set up correctly, it will generate a script code snippet for you, like this:
Configure Giscus in Analog
Next, fill in the corresponding comment
fields in the user configuration file /data/site-config.ts
:
Now, you can see the Giscus comment widget at the bottom of your posts (just like this post).
Setting Up Other Comment Systems
You can find other comment system components, such as Disqus and Utterances, from timlrx/pliny/comments.
Just replace the component in the post layout file /src/layouts/post-layout.tsx
with them.
Analog User Guide - Comment System
https://analog-demo.zhutmost.com/post/doc/comment