diff --git a/README.md b/README.md index 813c836be..28f7ae083 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ * **Many configuration options** — change the color palette, font families, language, icons, favicon and logo. Add a source repository link, links to your - social profiles, Google Analytics and Disqus - all with a few lines of config. + social profiles, and Google Analytics - all with a few lines of config. * **Truly international** — thanks to many contributors, Material for MkDocs includes translations for more than 40 languages and offers full native RTL diff --git a/docs/customization.md b/docs/customization.md index 1b4d11585..14696d872 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -178,7 +178,6 @@ The following template blocks are provided by the theme: | `announce` | Wraps the announcement bar | | `config` | Wraps the JavaScript application config | | `content` | Wraps the main content | -| `disqus` | Wraps the Disqus integration | | `extrahead` | Empty block to add custom meta tags | | `fonts` | Wraps the font definitions | | `footer` | Wraps the footer with navigation and copyright | diff --git a/docs/setup/adding-a-comment-system.md b/docs/setup/adding-a-comment-system.md index 62ba4ecc7..7f1f0b9dd 100644 --- a/docs/setup/adding-a-comment-system.md +++ b/docs/setup/adding-a-comment-system.md @@ -5,104 +5,92 @@ template: overrides/main.html # Adding a comment system Material for MkDocs allows to easily add the third-party comment system of your -choice to the footer of every page by using [theme extension]. As an example, -we'll be integrating [Disqus] a wildly popular comment provider, but others -can be integrate with the same principles +choice to the footer of any page by using [theme extension]. As an example, +we'll be integrating [Giscus], which is Open Source, free, and uses GitHub +discussions as a backend. - [Disqus]: https://disqus.com/ + [Giscus]: https://giscus.app/ ## Customization -### Disqus integration +### Giscus integration -In order to integrate a third-party comment provider offering a JavaScript-based -solution, follow the guide on [theme extension], copy the contents from the -[`content.html`][content partial] partial and create a file at the same location -in the `overrides` folder: +Before you can use [Giscus], you need to complete the following steps: -=== ":octicons-file-code-16: overrides/partials/content.html" +1. __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. +2. __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: ``` html - - - - {% set disqus = config.extra.disqus %} - {% if page and page.meta and page.meta.disqus is string %} - {% set disqus = page.meta.disqus %} - {% endif %} - - - {% if not page.is_homepage and disqus %} -