Feedback widget for Sphinx
Add the PushFeedback widget in a Sphinx project using PIP.
Prerequisites
- A PushFeedback project. Copy its project ID from Projects > your project > Snippet and replace
<YOUR_PROJECT_ID>in the examples. - A Sphinx project.
Examples use sphinx-pushfeedback 0.1.8. The extension loads the widget from jsDelivr. Choose one mode.
Installation
Floating button

-
Install the Sphinx extension:
python -m pip install sphinx-pushfeedback==0.1.8 -
Add
sphinx_pushfeedbackto your existingextensionslist inconf.py:extensions = ['sphinx_pushfeedback'] -
Configure your project ID in the
conf.pyfile:pushfeedback_project = '<YOUR_PROJECT_ID>'pushfeedback_feedback_button_text = "Feedback"Replace
<YOUR_PROJECT_ID>with your project's ID from the PushFeedback dashboard. -
Build the documentation:
make htmlOpen your documentation and click Feedback.
Customization
Add the extension’s supported configuration options to your conf.py file, with the following modifications:
-
Prefix configuration options with
pushfeedback_. For instance,projectwould bepushfeedback_project. -
Use underscores instead of hyphens as words separator. For example,
button-positionbecomespushfeedback_button_position.
Here's an example:
pushfeedback_button_style = "light"
The extension supports the button position and style, rating, visibility, and text settings registered in its configuration. For options it does not register, such as api-key, escape-close, and the accessible rating labels, use the raw HTML examples below and set attributes on <feedback-button> or <feedback-modal> directly.
Other installation modes
Inline button

-
Install the extension:
python -m pip install sphinx-pushfeedback==0.1.8 -
Configure
conf.py.pushfeedback_button_position = "default"suppresses the floating button while keeping the widget assets loaded:extensions = ['sphinx_pushfeedback']pushfeedback_project = '<YOUR_PROJECT_ID>'pushfeedback_button_position = 'default' -
Place this reStructuredText at the end of your article:
.. raw:: html<feedback-button project="<YOUR_PROJECT_ID>" button-position="default" modal-position="center" button-style="dark">Feedback</feedback-button>
Embedded form

-
Install the extension:
python -m pip install sphinx-pushfeedback==0.1.8 -
Configure
conf.py.pushfeedback_button_position = "default"suppresses the floating button while keeping the widget assets loaded:extensions = ['sphinx_pushfeedback']pushfeedback_project = '<YOUR_PROJECT_ID>'pushfeedback_button_position = 'default' -
Place this reStructuredText at the end of your article:
.. raw:: html<feedback-modal project="<YOUR_PROJECT_ID>" embedded="true"></feedback-modal>
Like and dislike buttons
![]()
-
Install the extension:
python -m pip install sphinx-pushfeedback==0.1.8 -
Configure
conf.py.pushfeedback_button_position = "default"suppresses the floating button while keeping the widget assets loaded:extensions = ['sphinx_pushfeedback']pushfeedback_project = '<YOUR_PROJECT_ID>'pushfeedback_button_position = 'default' -
Place this reStructuredText at the end of your article:
.. raw:: html<p>Was this helpful?</p><div class="pushfeedback-thumbs-row"><feedback-button project="<YOUR_PROJECT_ID>" rating="1" button-position="default" modal-position="center" button-style="light" custom-font="true">Helpful</feedback-button><feedback-button project="<YOUR_PROJECT_ID>" rating="0" button-position="default" modal-position="center" button-style="light" custom-font="true">Not helpful</feedback-button></div>
Verify the installation
Run make html, open your documentation, and send a test message. Confirm it appears in your PushFeedback project. Check allowed URLs if submission fails.