Installation¶
Getting started is pretty simple. The first step is to install the library.
pip install sphinx-disqus
pip install git+https://github.com/Robpol86/sphinx-disqus@master
Once the package is installed add this extension to your Sphinx’s extensions list in the conf.py
file. You’ll also need to
define your Disqus shortname in the same file.
# conf.py
extensions = [
# ... other extensions here
"sphinx_disqus.disqus",
]
disqus_shortname = "my-cool-project"
The last step is to enable comments on each document.
.. disqus::
```{disqus}
```
Specifying an Identifier¶
By default the extension will define the
Disqus identifier using the
document title. To override this behavior you can define your own identifier for a particular document using the
disqus_identifier
option.
.. disqus::
:disqus_identifier: name_of_this_page
```{disqus}
:disqus_identifier: name_of_this_page
```