# gitbook添加disqus作为评论

* 注册一个disqus账号
* 右上角齿轮 - add disqus to site 或者直接[这样](https://disqus.com/admin/create/)
* 注册你的站点，注意，这里还不用写网站地址

  ![](/files/-L_G1DOUEuky-Awp4ttv)

这里最重要的就是第二个框，这是之后gitbook需要配置的shortname，也就是图中的ahangchen-blogs。

* 然后访问刚刚第二个框的Disqus URL，即<https://ahangchen-blog.disqus.com/admin/settings/general/>

![](/files/-L_G1DOWIn-gj2qcRl5d)

在Website URL中填入你的gitbook地址（我试了一下增加具体的gitbook某本书的url，但不能生效，所以还是使用整个站点的url）

* 在你的gitbook工程根目录，添加一个book.json文件，内容：

```javascript
{
    "plugins": ["disqus"],
    "pluginsConfig": {
        "disqus": {
            "shortName": "ahangchen-blog"
        }
    }  
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.cweihang.io/kit/markdown/gitbook_disqus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
