Add Comments to Your MkDocs Site
Comments, Reactions, and Ratings for Material for MkDocs and Other Themes
Good docs get better with reader feedback. Override one template in your MkDocs theme, turn comments on for the pages you want, and readers can ask questions right under the content.
Steps to Add Comments to MkDocs
Sign up at the Hyvor Talk Console and add your website with your docs domain. Then copy the website ID from Settings → Website.
Option 1: Material for MkDocs
Material comes with a comments partial for adding a comment system. You replace it with the Hyvor Talk embed.
Point the theme to an overrides folder in
mkdocs.yml:theme: name: material custom_dir: overridesCreate
overrides/partials/comments.htmlwith the code below, and replaceYOUR_WEBSITE_IDwith your website ID.{% if page.meta.comments %} <h2 id="__comments">{{ lang.t("meta.comments") }}</h2> <script async src="https://talk.hyvor.com/embed/embed.js" type="module"></script> <hyvor-talk-comments website-id="YOUR_WEBSITE_ID" page-id="{{ page.url }}" ></hyvor-talk-comments> {% endif %}Turn comments on in the front matter of each page that should have them:
--- comments: true --- # My pageRun
mkdocs serveand open the page. The comments show up at the bottom.
Option 2: Other themes
For the built-in mkdocs theme and most others, set custom_dir in mkdocs.yml the same way, then create overrides/main.html to add the comments
after each page's content:
{% extends "base.html" %}
{% block content %}
{{ super() }}
<script async src="https://talk.hyvor.com/embed/embed.js" type="module"></script>
<hyvor-talk-comments
website-id="YOUR_WEBSITE_ID"
page-id="{{ page.url }}"
></hyvor-talk-comments>
{% endblock %}Block names can differ between themes. If content doesn't exist in yours, check
the theme's base.html for the block that wraps the page.
That's it. Run mkdocs build and deploy. The page URL is used as the page ID, so
keep URLs stable, or see page-id for other options.
Frequently asked questions
Yes. Material has a comments partial made for adding a comment system. You override that one file with the Hyvor Talk embed, and the theme takes care of the rest.
No. There's nothing to pip install. A theme override with the embed code works like a comments plugin and doesn't add any build steps.
That's how Material's comments partial works, so you choose where comments belong. If you want them everywhere, remove the {% if %} check from the partial.
Material's instant navigation swaps the page content without a full reload. The comments are a web component, so a new one renders with each page you open.
Ask questions, reply in threads, upvote helpful answers, and get an email when someone replies. You can add reactions or ratings to see which pages need work.
Readers don't need a GitHub account to comment. They comment with a HYVOR account, or you can connect your own logins with SSO. You also get spam filtering and moderation tools.
Yes. Start a 14-day free trial, no credit card needed. Plans are on the pricing page.