Skip to content

Commit c811839

Browse files
authored
Merge pull request #4 from guillermocalvo/patch-1
Fix configuration injection
2 parents c6bb8e9 + ddac906 commit c811839

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/plugin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ require(['gitbook'], function (gitbook) {
6464
return window["gitbook-plugin-github-buttons"];
6565
}
6666

67+
// make sure configuration gets injected
68+
gitbook.events.bind('start', function (e, config) {
69+
window["gitbook-plugin-github-buttons"] = config["github-buttons"];
70+
});
71+
6772
gitbook.events.bind('page.change', function () {
6873
init(getPluginConfig());
6974
});

0 commit comments

Comments
 (0)