squidfunk / mkdocs-material

Documentation that simply works
https://squidfunk.github.io/mkdocs-material/
MIT License
20.28k stars 3.48k forks source link

Disqus not loading properly #1888

Closed ghost closed 4 years ago

ghost commented 4 years ago

I checked that...

Description

Disqus is not loading on my site.

Expected behavior

Disqus to work properly on my site.

Actual behavior

Disqus is not loading on my site, but instead it's always showing up "We were unable to load Disqus.". By the way in some 127.0.0.1:8000 pages, I can properly load Disqus.

Steps to reproduce the bug

  1. Add the following to mkdocs.yml:
    extra:
    disqus: themoddingguides

Package versions

Project configuration

site_name: The Modding Guides

repo_name: The Modding Guides
repo_url: https://github.com/TheModdingGuides/TheModdingGuides.github.io/
edit_uri: ""

nav:
# A lot of navigation stuff

theme:
    font: false
    features:
      - instant
    name: material
    palette:
      primary: red
      accent: red
      scheme: preference
    language: it
    favicon: img/favicon.ico
    custom_dir: overrides

markdown_extensions:
    - toc:
        permalink: true
        toc_depth: 4
    - admonition
    - pymdownx.details
    - pymdownx.superfences
    - pymdownx.highlight:
        use_pygments: true
        linenums: true
    - pymdownx.inlinehilite
    - pymdownx.keys
    - pymdownx.tabbed
    - pymdownx.caret
    - pymdownx.mark
    - pymdownx.tilde
    - pymdownx.emoji:
        emoji_index: !!python/name:materialx.emoji.twemoji
        emoji_generator: !!python/name:materialx.emoji.to_svg
    - meta
    - attr_list

plugins:
    - search
    - git-revision-date-localized:
        type: datetime
        locale: it
        # about the following, is always giving me "Warning: ('time_zone', 'Unrecognised configuration name: time_zone')"
        time_zone: Europe/Rome

extra:
    disqus: themoddingguides
    social:
        # Social stuff

System information

Additional info

I also added github.io to trusted domain but nothing has changed. I also added two screenshots of my disqus admin page, if that could help. Maybe some configuration is wrong on my side? I don't understand what could be wrong.

Disqus_1 Disqus_2

squidfunk commented 4 years ago

Thanks for reporting. Could you check whether it works with 5.5.9? We changed something on the integration recently, so it might be related.

ghost commented 4 years ago

Even with version 5.5.9 I have the same issue. Online it gives me the error on every page, but it's loading on two localhost pages and only in chrome, not in firefox:

squidfunk commented 4 years ago

Did you set the site_url? See: https://squidfunk.github.io/mkdocs-material/setup/adding-a-comment-system/#disqus

ghost commented 4 years ago

I am dumb, I was missing site_url in my mkdocs.yml file. Thank you for your time!