hook 'page' is deprecated
Closed this issue · 9 comments
piranna commented
By using gitbook 2.0.0, autocover raise the next error
hook 'page' used by plugin 'gitbook-plugin-anchors' is deprecated, and will be remove in the coming versions
This should be updated.
wcandillon commented
+1
piranna commented
Any update on this?
rlmv commented
Hi @piranna @zuoRambo @wcandillon, I'm no longer using Gitbook so have not kept up with the Gitbook API. Can one of you send me a pull request? I'm happy to merge.
zuoRambo commented
@rlmv i study the source code of gitbook,find that after the version 0.7.1 gitbook deprecated many hooks
//line 33 lib\plugin.js
Plugin.HOOKS = [
"init", "finish", "finish:before"
]
//line 158
if (!_.contains(Plugin.HOOKS, name)) this.book.log.warn.ln("hook '"+name+"' used by plugin '"+this.name+"' is deprecated, and will be removed in the coming versions");
piranna commented
And how we could fix it? What could be the alternative to 'page' hook?
bbatsche commented
Just to make things even worse, the hook may or may not actually be deprecated: GitbookIO/gitbook#684
SamyPesse commented
These hooks are no longer deprecated: GitbookIO/gitbook@a442259
rlmv commented
Looks like this is resolved. Thanks for the update @SamyPesse!