Adding a comment system¶
- Install the Giscus GitHub App and grant access to the repository that should host comments as GitHub discussions. Note that this can be a repository different from your documentation.
-
Visit Giscus and generate the snippet through their configuration tool to load the comment system. Copy the snippet for the next step. The resulting snippet should look similar to this:
3. Add theme extension and override the<script src="https://giscus.app/client.js" data-repo="speaknowpotato/mkdocs-template" data-repo-id="R_kgDOIPlEiw" data-category="General" data-category-id="DIC_kwDOIPlEi84CSPcD" data-mapping="pathname" data-strict="0" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="top" data-theme="preferred_color_scheme" data-lang="en" crossorigin="anonymous" async> </script>
comments.html
. More details could be found in Setup and theme structure. -
Enable comment, add the following lines to each markdown file that you want to have comment system.
Reference¶
Last update:
2022-10-30
Created: 2022-10-30
Created: 2022-10-30