-
In the Material for MkDocs 8 - Beta issue was it mentioned, that Disqus has been removed due to its rather drastic changes in the past years. While it's sad to lose this feature (at least natively) can I understand the reasons behind the removal of the native support. There are currently two minor issues tho that I would need help with to get this hopefully working:
And another unrelated question is, would it be considered to include a possible native support for giscus in the future? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I managed to make it work by simply replacing the current script part in my disqus override with the one giscus gives me after configuring it. Here's an example of my current {% set disqus = config.extra.disqus %}
{% if page and page.meta and page.meta.disqus is string %}
{% set disqus = page.meta.disqus %}
{% endif %}
<!-- Disqus integration -->
{% if not page.is_homepage and disqus %}
<h2 id="__comments">
<span class="twemoji">
{% include ".icons/octicons/comment-discussion-24.svg" %}
</span>
{{ lang.t("meta.comments") }}
</h2>
<div id="disqus_thread"></div>
<script src="https://giscus.app/client.js"
data-repo="Andre601/blog"
data-repo-id="MDEwOlJlcG9zaXRvcnkzMjMxMjM0MjQ="
data-category="Comments"
data-category-id="DIC_kwDOE0J44M4B_2e-"
data-mapping="title"
data-reactions-enabled="1"
data-emit-metadata="0"
data-theme="dark_dimmed"
data-lang="en"
crossorigin="anonymous"
async>
</script>
{% endif %} Of course, this for now only delays the day at which I have to find a new way to include comments in the MkDocs pages since the override won't function anymore unless squidfunk will implement something... But that's something to worry about for the future... |
Beta Was this translation helpful? Give feedback.
I managed to make it work by simply replacing the current script part in my disqus override with the one giscus gives me after configuring it.
Here's an example of my current
disqus.html
override: