Skip to content
Snippets Groups Projects
Commit 6ecf71ee authored by squidfunk's avatar squidfunk
Browse files

Fixed JavaScript error on home page if Disqus is enabled

parent e625efdf
No related branches found
No related tags found
No related merge requests found
......@@ -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 %}
{% endblock %}
</article>
</div>
......
......@@ -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
......
......@@ -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 %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>
......
......@@ -21,7 +21,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 %}
<li class="md-nav__item">
<a href="#__comments" title="{{ lang.t('meta.comments') }}" class="md-nav__link md-nav__link--active">
{{ lang.t("meta.comments") }}
......
......@@ -295,10 +295,7 @@
<!-- Disqus integration -->
{% 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 %}
{% endblock %}
</article>
</div>
......
......@@ -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
......
......@@ -27,7 +27,7 @@
{% endif %}
<!-- Disqus integration -->
{% if disqus %}
{% if not page.is_homepage and disqus %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>
......
......@@ -54,12 +54,14 @@
</li>
{% endif %}
<!-- Disqus integration -->
<!-- Set from config but allow override -->
{% set disqus = config.extra.disqus %}
{% if page and page.meta and page.meta.disqus is string %}
{% set disqus = page.meta.disqus %}
{% endif %}
{% if disqus %}
<!-- Disqus integration -->
{% if not page.is_homepage and disqus %}
<li class="md-nav__item">
<a href="#__comments" title="{{ lang.t('meta.comments') }}"
class="md-nav__link md-nav__link--active">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment