Removed Disqus integration

This commit is contained in:
squidfunk 2021-11-13 13:15:58 +01:00
parent d5593e34a5
commit 7f4458eb18
7 changed files with 4 additions and 80 deletions

View File

@ -101,8 +101,7 @@ assets may also be put in the `overrides` directory:
├─ partials/
│ ├─ integrations/ # Third-party integrations
│ │ ├─ analytics/ # Analytics integrations
│ │ ├─ analytics.html # Analytics setup
│ │ └─ disqus.html # Disqus
│ │ └─ analytics.html # Analytics setup
│ ├─ languages/ # Translation languages
│ ├─ footer.html # Footer bar
│ ├─ header.html # Header bar
@ -110,6 +109,9 @@ assets may also be put in the `overrides` directory:
│ ├─ logo.html # Logo in header and sidebar
│ ├─ nav.html # Main navigation
│ ├─ nav-item.html # Main navigation item
│ ├─ page.html # Page
│ ├─ page-footer.html # Page footer
│ ├─ page-header.html # Page header
│ ├─ palette.html # Color palette
│ ├─ search.html # Search box
│ ├─ social.html # Social links

View File

@ -5,4 +5,3 @@
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
{% block disqus %}{% endblock %}

View File

@ -1,12 +0,0 @@
{#-
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 %}

View File

@ -7,4 +7,3 @@
) %}
{% include "partials/source-file.html" %}
{% endif %}
{% include "partials/integrations/disqus.html" %}

View File

@ -26,6 +26,3 @@
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
<!-- Disqus integration -->
{% block disqus %}{% endblock %}

View File

@ -1,58 +0,0 @@
<!--
Copyright (c) 2016-2021 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<!-- 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 %}
<!-- Disqus integration -->
{% if not page.is_homepage and disqus %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
<div id="disqus_thread"></div>
<script>
var disqus_config = function() {
this.page.url = "{{ page.canonical_url }}"
this.page.identifier =
"{{ page.canonical_url | replace(config.site_url, '') }}"
}
/* Set up for the first time */
if (typeof DISQUS === "undefined") {
var script = document.createElement("script")
script.async = true
script.src = "https://{{ disqus }}.disqus.com/embed.js"
script.setAttribute("data-timestamp", Date.now())
/* Inject script tag */
document.body.appendChild(script)
/* Set up on navigation (instant loading) */
} else {
DISQUS.reset({
reload: true,
config: disqus_config
})
}
</script>
{% endif %}

View File

@ -27,6 +27,3 @@
) %}
{% include "partials/source-file.html" %}
{% endif %}
<!-- Disqus integration -->
{% include "partials/integrations/disqus.html" %}