:giscus-on: How to use ============================== Install ---------- With ``pip``: .. code-block:: console pip install sphinxcontrib-giscus Or with ``uv``: .. code-block:: console uv add sphinxcontrib-giscus Configure ------------- In your ``conf.py``, add to ``sphinxcontrib-giscus`` extensions: .. code-block:: python extensions = [ 'sphinxcontrib_giscus' ... ] Required Configuration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: python data_repo = 'xxxx' data_repo_id = 'xxxx' data_category = 'xxxx' data_category_id = 'xxxxx' You can get these configurations from `Giscus`_ . .. _Giscus: https://giscus.app/zh-CN 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.