No way to disable disqus on given pages (disqus: false is not taking effect)
m0un10 opened this issue · 7 comments
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:
├── gitbook-plugin-custom-favicon@0.0.4
├── gitbook-plugin-disqus@0.1.0
├── gitbook-plugin-favicon@0.0.2
├── gitbook-plugin-hints@1.0.2
└─┬ gitbook-plugin-simple-page-toc@0.1.1
├─┬ markdown-toc@0.12.16
│ ├─┬ concat-stream@1.6.0
│ │ ├── inherits@2.0.3
│ │ ├─┬ readable-stream@2.2.2
│ │ │ ├── buffer-shims@1.0.0
│ │ │ ├── core-util-is@1.0.2
│ │ │ ├── isarray@1.0.0
│ │ │ ├── process-nextick-args@1.0.7
│ │ │ ├── string_decoder@0.10.31
│ │ │ └── util-deprecate@1.0.2
│ │ └── typedarray@0.0.6
│ ├─┬ gray-matter@2.1.0
│ │ ├─┬ ansi-red@0.1.1
│ │ │ └── ansi-wrap@0.1.0
│ │ ├── extend-shallow@2.0.1
│ │ └─┬ js-yaml@3.8.1
│ │ ├─┬ argparse@1.0.9
│ │ │ └── sprintf-js@1.0.3
│ │ └── esprima@3.1.3
│ ├─┬ lazy-cache@2.0.2
│ │ └─┬ set-getter@0.1.0
│ │ └── to-object-path@0.3.0
│ ├─┬ list-item@1.1.1
│ │ ├─┬ expand-range@1.8.2
│ │ │ └─┬ fill-range@2.2.3
│ │ │ ├── randomatic@1.1.6
│ │ │ └── repeat-element@1.1.2
│ │ └─┬ is-number@2.1.0
│ │ └─┬ kind-of@3.1.0
│ │ └── is-buffer@1.1.4
│ ├── markdown-link@0.1.1
│ ├── minimist@1.2.0
│ ├─┬ mixin-deep@1.1.3
│ │ ├── for-in@0.1.6
│ │ └── is-extendable@0.1.1
│ ├─┬ object.pick@1.2.0
│ │ └── isobject@2.1.0
│ ├─┬ remarkable@1.7.1
│ │ ├─┬ argparse@0.1.16
│ │ │ ├── underscore@1.7.0
│ │ │ └── underscore.string@2.4.0
│ │ └── autolinker@0.15.3
│ ├── repeat-string@1.6.1
│ └── strip-color@0.1.0
└─┬ uslug@1.0.4
└── unorm@1.4.1
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! 😄
Same issue here. Any updates?
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": ["disqus@1.0.1"],
, I get Error: Found no satisfactory version for plugin "disqus" with requirement "1.0.1"
.
Whereas trying "plugins": ["disqus@0.1.0"]
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?
is there any updates in regard of this issue? I still experience the same
is there any updates in regard of this issue? I still experience the same
gitbook@4.0.0-alpha.6
gitbook-plugin-disqus@1.0.1",
I ended up by adding custom js script to forcefully hide the comment sections
Just add <style> #disqus_thread { display: none } </style>
on the pages where you want to disable disqus.