Feedback widget for MkDocs
Add PushFeedback to your MkDocs site.
Prerequisites
- A PushFeedback project. Copy its project ID from Projects > your project > Snippet and replace
<YOUR_PROJECT_ID>in the examples. - A MkDocs project.
Examples use pushfeedback 0.1.87. Choose one installation mode.
These examples use Material for MkDocs. Other themes use different template blocks.
Installation
Floating button

Install the theme:
python -m pip install mkdocs-material
Create docs/overrides/main.html:
{% extends "base.html" %}
{% block extrahead %}
{{ super() }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.esm.js"></script>
{% endblock %}
{% block content %}
{{ super() }}
<feedback-button project="<YOUR_PROJECT_ID>" button-position="bottom-right" modal-position="sidebar-right" button-style="dark">Feedback</feedback-button>
{% endblock %}
Set the override directory in mkdocs.yml, keeping your existing theme options:
theme:
name: material
custom_dir: docs/overrides
Inline button

Install the theme:
python -m pip install mkdocs-material
Create docs/overrides/main.html:
{% extends "base.html" %}
{% block extrahead %}
{{ super() }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.esm.js"></script>
{% endblock %}
{% block content %}
{{ super() }}
<feedback-button project="<YOUR_PROJECT_ID>" button-position="default" modal-position="center" button-style="dark">Feedback</feedback-button>
{% endblock %}
Set the override directory in mkdocs.yml, keeping your existing theme options:
theme:
name: material
custom_dir: docs/overrides
Embedded form

Install the theme:
python -m pip install mkdocs-material
Create docs/overrides/main.html:
{% extends "base.html" %}
{% block extrahead %}
{{ super() }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.esm.js"></script>
{% endblock %}
{% block content %}
{{ super() }}
<feedback-modal project="<YOUR_PROJECT_ID>" embedded="true"></feedback-modal>
{% endblock %}
Set the override directory in mkdocs.yml, keeping your existing theme options:
theme:
name: material
custom_dir: docs/overrides
Like and dislike buttons
![]()
Install the theme:
python -m pip install mkdocs-material
Create docs/overrides/main.html:
{% extends "base.html" %}
{% block extrahead %}
{{ super() }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pushfeedback/pushfeedback.esm.js"></script>
{% endblock %}
{% block content %}
{{ super() }}
<p>Was this helpful?</p>
<feedback-button project="<YOUR_PROJECT_ID>" rating="1" button-position="default" modal-position="center" button-style="light">Helpful</feedback-button>
<feedback-button project="<YOUR_PROJECT_ID>" rating="0" button-position="default" modal-position="center" button-style="light">Not helpful</feedback-button>
{% endblock %}
Set the override directory in mkdocs.yml, keeping your existing theme options:
theme:
name: material
custom_dir: docs/overrides
Verify the installation
Run mkdocs build --strict and open your site. Send a test message and confirm it appears in your PushFeedback project. Check allowed URLs if submission fails.