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

No way to disable disqus on given pages (disqus: false is not taking effect) #10

Open
m0un10 opened this issue Feb 17, 2017 · 7 comments

Comments

@m0un10
Copy link

m0un10 commented Feb 17, 2017

As per the README.md it indicates that disqus can be disabled for a given page with this:

---
disqus: false
---

I've tried that and it doesn't seem to have any effect when I run gitbook serve. Even after doing a stop and only running gitbook serve after the change is saved to one or two .md files, it still has the comment on every single page including the pages with disqus: false.

The structure of my .md is like this:

---
disqus: false
---

# {{ page.title }}
 
Content is here 

My Gitbook version is:

CLI version: 2.3.0
GitBook version: 3.2.2

My installed plugins are:

├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└─┬ [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ ├── [email protected]
  │ │ │ ├── [email protected]
  │ │ │ ├── [email protected]
  │ │ │ ├── [email protected]
  │ │ │ ├── [email protected]
  │ │ │ └── [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ └── [email protected]
  │ │ ├── [email protected]
  │ │ └─┬ [email protected]
  │ │   ├─┬ [email protected]
  │ │   │ └── [email protected]
  │ │   └── [email protected]
  │ ├─┬ [email protected]
  │ │ └─┬ [email protected]
  │ │   └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ └─┬ [email protected]
  │ │ │   ├── [email protected]
  │ │ │   └── [email protected]
  │ │ └─┬ [email protected]
  │ │   └─┬ [email protected]
  │ │     └── [email protected]
  │ ├── [email protected]
  │ ├── [email protected]
  │ ├─┬ [email protected]
  │ │ ├── [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ ├─┬ [email protected]
  │ │ ├─┬ [email protected]
  │ │ │ ├── [email protected]
  │ │ │ └── [email protected]
  │ │ └── [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  └─┬ [email protected]
    └── [email protected]

My book.json is

{
    "gitbook": "3.2.2",
    "plugins": [
        "hints",
        "simple-page-toc",
        "custom-favicon",
        "disqus"
    ],
    "pluginsConfig": {
        "theme-default": {
            "showLevel": false
        }, 
        "simple-page-toc": {
            "maxDepth": 7,
            "skipFirstH1": true
        },
        "favicon": "assets/favicon.ico",
        "disqus": {
            "shortName": "myst-studio-documentation"
        }
    }
}

Please help! 😄

@m0un10 m0un10 changed the title No way disable disqus on given pages No way to disable disqus on given pages (disqus: false is not taking effect) Feb 17, 2017
@joshmccall221
Copy link

Same issue here. Any updates?

@ScalaWilliam
Copy link

I'm also having problems. It looks like you're installing gitbook-plugin-disqus version 0.1.0.

Latest released version is 1.0.1, but if I try enabling it with "plugins": ["[email protected]"],, I get Error: Found no satisfactory version for plugin "disqus" with requirement "1.0.1".

Whereas trying "plugins": ["[email protected]"] is fine.

1.0.1 cannot be satisfied because in 1.0.x, the engine required is:

  "engines": {
     "gitbook": ">=4.0.0-alpha"
  },

and default gitbook at the time is GitBook version: 3.2.2.

So master documentation of this project is not specific enough to indicate that it only works against an alpha version of gitbook engine.

If you wanted to customise anything, you'd need to look at the source code of version 0.1.0, which is here: https://github.com/GitbookIO/plugin-disqus/blob/0.1.0/book/plugin.js and README here. You'll notice there's nothing to enable/disable Disqus here, sadly enough.

The reason why I'm looking at this is so that I could only have Disqus enabled on one or two pages, rather than everywhere, for consolidation. Looks not possible to do right now, and even if I contribute a change it won't be visible until GitBook 4 is released.

@SamyPesse could advise?

aborruso added a commit to aborruso/plugin-disqus that referenced this issue Feb 25, 2018
@novalagung
Copy link

is there any updates in regard of this issue? I still experience the same

1 similar comment
@freedom93
Copy link

is there any updates in regard of this issue? I still experience the same

@freedom93
Copy link

@novalagung
Copy link

I ended up by adding custom js script to forcefully hide the comment sections

@shivam-tripathi
Copy link

Just add <style> #disqus_thread { display: none } </style> on the pages where you want to disable disqus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants