rlmv/gitbook-plugin-anchors

hook 'page' is deprecated

Closed this issue · 9 comments

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.

Any update on this?

+1 @rlmv please attention

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.

@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");

And how we could fix it? What could be the alternative to 'page' hook?

Just to make things even worse, the hook may or may not actually be deprecated: GitbookIO/gitbook#684

These hooks are no longer deprecated: GitbookIO/gitbook@a442259

rlmv commented

Looks like this is resolved. Thanks for the update @SamyPesse!