How to use¶
Install¶
With pip
:
pip install sphinxcontrib-giscus
Or with uv
:
uv add sphinxcontrib-giscus
Configure¶
In your conf.py
, add to sphinxcontrib-giscus
extensions:
extensions = [
'sphinxcontrib_giscus'
...
]
Required Configuration¶
data_repo = 'xxxx'
data_repo_id = 'xxxx'
data_category = 'xxxx'
data_category_id = 'xxxxx'
You can get these configurations from Giscus .
Enable giscus on a specified page¶
Just add ::giscus-on:
into the header of the page where you want to enable giscus.
If everything goes well, the Giscus comments area will be displayed at the bottom of the page.