kubernetes-handbook/gitbook/gitbook-plugin-github/plugin.js

15 lines
388 B
JavaScript
Raw Normal View History

2017-08-21 17:44:43 +08:00
require([ 'gitbook' ], function (gitbook) {
gitbook.events.bind('start', function (e, config) {
var githubURL = config.github.url;
gitbook.toolbar.createButton({
icon: 'fa fa-github',
label: 'GitHub',
position: 'right',
onClick: function() {
window.open(githubURL)
}
});
});
});