1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 15:40:15 +01:00
mkdocs-material/material/partials/integrations/disqus.html
2021-10-02 13:51:54 +02:00

13 lines
793 B
HTML

{#-
This file was automatically generated - do not edit
-#}
{% 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 %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>var script,disqus_config=function(){this.page.url="{{ page.canonical_url }}",this.page.identifier="{{ page.canonical_url | replace(config.site_url, '') }}"};"undefined"==typeof DISQUS?((script=document.createElement("script")).async=!0,script.src="https://{{ disqus }}.disqus.com/embed.js",script.setAttribute("data-timestamp",Date.now()),document.body.appendChild(script)):DISQUS.reset({reload:!0,config:disqus_config})</script>
{% endif %}