Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disqus also shows on the 404 page #2186

Closed
5 tasks done
JC5 opened this issue Jan 6, 2021 · 3 comments
Closed
5 tasks done

Disqus also shows on the 404 page #2186

JC5 opened this issue Jan 6, 2021 · 3 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@JC5
Copy link

JC5 commented Jan 6, 2021

  • I've read the [contribution guidelines][1] and agree with them

I've found a bug and checked that ...

  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The 404 page also renders a Disqus block, which I believe should be disabled on 404 pages. Or at least optional?

Package versions

  • Python 3.8.5
  • mkdocs, version 1.1.2
  • material Version: 6.2.3
theme:
  name: material
  features:
    - navigation.tabs
  palette:
    primary: blue grey
    accent: red
  logo: img/logo.png
  favicon: img/favicon.ico
  icon:
    repo: fontawesome/brands/github
extra:
  disqus: firefly-iii-documentation
  social:
    - icon: fontawesome/brands/twitter
      link: https://twitter.com/Firefly_III
    - icon: fontawesome/brands/github
      link: https://github.com/firefly-iii
    - icon: fontawesome/brands/reddit
      link: https://old.reddit.com/r/FireflyIII

plugins:
  - search
  - 'git-revision-date'
  - redirects:
      redirect_maps:

System information

MacOS, Firefox 84.0.1

@squidfunk
Copy link
Owner

That's indeed unintended, we should exclude disqus from the 404.html.

As a quick fix you can use theme overrides and override the disqus block:

<!-- overrides/404.html -->
{% extends "main.html" %}
{% block disqus %}{% endblock %}
{% block content %}
  <h1>404 - Not found</h1>
{% endblock %}

@squidfunk squidfunk added the bug Issue reports a bug label Jan 6, 2021
JC5 added a commit to firefly-iii/docs that referenced this issue Jan 6, 2021
@squidfunk
Copy link
Owner

Fixed in 5b1ee2a.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Jan 9, 2021
@squidfunk
Copy link
Owner

Released as part of 6.2.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

2 participants