From 6ecf71ee8d830880afc1d12572f005047173dbd7 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Wed, 21 Mar 2018 20:05:27 +0100 Subject: [PATCH] Fixed JavaScript error on home page if Disqus is enabled --- material/base.html | 5 +---- material/mkdocs_theme.yml | 2 +- material/partials/integrations/disqus.html | 2 +- material/partials/toc.html | 2 +- src/base.html | 5 +---- src/mkdocs_theme.yml | 2 +- src/partials/integrations/disqus.html | 2 +- src/partials/toc.html | 6 ++++-- 8 files changed, 11 insertions(+), 15 deletions(-) diff --git a/material/base.html b/material/base.html index d2cf83013..27f643064 100644 --- a/material/base.html +++ b/material/base.html @@ -159,10 +159,7 @@ {% endblock %} {% endblock %} {% block disqus %} - {% if (config.extra.disqus and not page.is_homepage) or - (page and page.meta and page.meta.disqus) %} - {% include "partials/integrations/disqus.html" %} - {% endif %} + {% include "partials/integrations/disqus.html" %} {% endblock %} diff --git a/material/mkdocs_theme.yml b/material/mkdocs_theme.yml index 10d073999..2cd43ea53 100644 --- a/material/mkdocs_theme.yml +++ b/material/mkdocs_theme.yml @@ -21,7 +21,7 @@ # Language for theme localization language: en -# Text direction (can be ltr or rtl) +# Text direction (can be ltr or rtl), default: ltr direction: # Feature flags for functionality that alters behavior significantly, and thus diff --git a/material/partials/integrations/disqus.html b/material/partials/integrations/disqus.html index 666ca08c6..967ae6343 100644 --- a/material/partials/integrations/disqus.html +++ b/material/partials/integrations/disqus.html @@ -2,7 +2,7 @@ {% if page and page.meta and page.meta.disqus is string %} {% set disqus = page.meta.disqus %} {% endif %} -{% if disqus %} +{% if not page.is_homepage and disqus %}

{{ lang.t("meta.comments") }}